@valkyriestudios/utils 12.8.0 → 12.9.0
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/object/is.js +1 -2
- package/object/isNotEmpty.js +6 -1
- package/package.json +1 -1
package/object/is.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = exports.isObject = void 0;
|
|
4
|
-
const PROTO_OBJ = '[object Object]';
|
|
5
4
|
function isObject(val) {
|
|
6
|
-
return Object.prototype.toString.call(val) ===
|
|
5
|
+
return Object.prototype.toString.call(val) === '[object Object]';
|
|
7
6
|
}
|
|
8
7
|
exports.isObject = isObject;
|
|
9
8
|
exports.default = isObject;
|
package/object/isNotEmpty.js
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = exports.isNotEmptyObject = void 0;
|
|
4
4
|
function isNotEmptyObject(val) {
|
|
5
|
-
|
|
5
|
+
if (Object.prototype.toString.call(val) !== '[object Object]')
|
|
6
|
+
return false;
|
|
7
|
+
for (const _ in val) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
6
11
|
}
|
|
7
12
|
exports.isNotEmptyObject = isNotEmptyObject;
|
|
8
13
|
exports.default = isNotEmptyObject;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@valkyriestudios/utils", "version": "12.
|
|
1
|
+
{ "name": "@valkyriestudios/utils", "version": "12.9.0", "description": "A collection of single-function utilities for common tasks", "author": { "name": "Peter Vermeulen", "url": "https://www.linkedin.com/in/petervermeulen1/" }, "keywords": [ "utility", "library", "javascript", "js", "node", "bun" ], "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ValkyrieStudios/utils.git" }, "bugs": { "url": "https://github.com/ValkyrieStudios/utils/issues" }, "homepage": "https://github.com/ValkyrieStudios/utils#readme", "types": "index.d.ts" }
|