is-object-empty2 1.0.6 → 1.0.7
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/index.d.ts +2 -0
- package/index.js +3 -1
- package/package.json +1 -1
- package/test/index.test.js +1 -0
package/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Checks if a given value is a plain object and has no own properties.
|
|
3
3
|
* Returns `true` only for empty plain objects (`{}`), and `false` for arrays, null, undefined, or objects with keys.
|
|
4
4
|
*
|
|
5
|
+
* Handles edge cases like objects with enumerable symbols, getters/setters, and prototype properties.
|
|
6
|
+
*
|
|
5
7
|
* @param {unknown} obj - The value to check.
|
|
6
8
|
* @returns {boolean} - `true` if the value is an empty object, otherwise `false`.
|
|
7
9
|
*
|
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.
|
|
3
|
+
* @version: v1.0.7
|
|
4
4
|
* @link: https://github.com/tutyamxx/is-object-empty2
|
|
5
5
|
* @license: MIT
|
|
6
6
|
**/
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* Checks if a given value is a plain object with no own properties.
|
|
11
11
|
* Returns `true` only for empty objects (`{}`), and `false` for arrays, null, undefined, or objects with keys.
|
|
12
12
|
*
|
|
13
|
+
* Handles edge cases like objects with enumerable symbols, getters/setters, and prototype properties.
|
|
14
|
+
*
|
|
13
15
|
* @param {unknown} obj - The value to check.
|
|
14
16
|
* @returns {boolean} `true` if the value is an empty plain object, otherwise `false`.
|
|
15
17
|
*
|
package/package.json
CHANGED