is-object-empty2 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes ADDED
@@ -0,0 +1,5 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ # Prevent git from converting linebreaks in .js files
5
+ *.js text eol=lf
package/README.md CHANGED
@@ -31,7 +31,7 @@ $ npm i is-object-empty2
31
31
 
32
32
  # JavaScript
33
33
  ```javascript
34
- const isObjectEmpty2 = require('is-object-empty');
34
+ const isObjectEmpty2 = require('is-object-empty2');
35
35
 
36
36
  console.log(isObjectEmpty2({})); // true
37
37
  console.log(isObjectEmpty2({ a: 1 })); // false
@@ -42,7 +42,7 @@ console.log(isObjectEmpty2(undefined)); // false
42
42
 
43
43
  # TypeScript
44
44
  ```javascript
45
- import isObjectEmpty2 = require('is-object-empty');
45
+ import isObjectEmpty2 = require('is-object-empty2');
46
46
 
47
47
  const testValues: unknown[] = [
48
48
  {},
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * is-object-empty2 - 📦 Tiny utility to check if a value is a plain empty object in JavaScript and TypeScript
3
- * @version: v1.0.0
3
+ * @version: v1.0.3
4
4
  * @link: https://github.com/tutyamxx/is-object-empty2
5
5
  * @license: MIT
6
6
  **/
@@ -20,6 +20,6 @@
20
20
  * isObjectEmpty2(null); // false
21
21
  * isObjectEmpty2(undefined); // false
22
22
  */
23
- const isObjectEmpty2 = (obj) => obj !== null && typeof obj === 'object' && !Array.isArray(obj) ? Object.keys(obj).length === 0 : false;
23
+ const isObjectEmpty2 = (obj) => (obj !== null && typeof obj === 'object' && !Array.isArray(obj)) ? Object.keys(obj).length === 0 : false;
24
24
 
25
25
  module.exports = isObjectEmpty2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-object-empty2",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "📦 Tiny utility to check if a value is a plain empty object in JavaScript or TypeScript",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",