vanilla-jui 1.5.3 → 1.5.4
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/dist/index.d.ts +2 -4
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -6
- package/src/index.ts +0 -1
- package/src/utilities/object.ts +16 -3
- package/src/utilities/function.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-jui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A lightweight, reactive, and fully customizable vanilla JS UI library.",
|
|
6
6
|
"keywords": [
|
|
@@ -61,8 +61,6 @@
|
|
|
61
61
|
"prepublishOnly": "vp run build"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@types/lodash-es": "^4.17.12",
|
|
65
|
-
"lodash-es": "^4.18.1",
|
|
66
64
|
"vanilla-create-storage": "latest",
|
|
67
65
|
"vanilla-signal": "^1.1.4",
|
|
68
66
|
"vanilla-signal-i18n": "latest"
|
|
@@ -73,9 +71,6 @@
|
|
|
73
71
|
"typescript": "latest",
|
|
74
72
|
"vite-plus": "latest"
|
|
75
73
|
},
|
|
76
|
-
"inlinedDependencies": {
|
|
77
|
-
"lodash-es": "4.18.1"
|
|
78
|
-
},
|
|
79
74
|
"registry": {
|
|
80
75
|
"type": "git",
|
|
81
76
|
"url": "git+https://github.com/WangShai123/vanilla-jui.git"
|
package/src/index.ts
CHANGED
|
@@ -11,7 +11,6 @@ export * from './core/motion.ts';
|
|
|
11
11
|
export * from './utilities/object.ts';
|
|
12
12
|
export * from './utilities/timer.ts';
|
|
13
13
|
export * from './utilities/types.ts';
|
|
14
|
-
export * from './utilities/function.ts';
|
|
15
14
|
export * from './core/scheduler.ts';
|
|
16
15
|
export * from './utilities/state.ts';
|
|
17
16
|
export * from './utilities/refs.ts';
|
package/src/utilities/object.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
const objectTag = '[object Object]';
|
|
2
|
+
const objectCtorString = Function.prototype.toString.call(Object);
|
|
2
3
|
|
|
3
|
-
export function isPlainObject(
|
|
4
|
-
|
|
4
|
+
export function isPlainObject(value: unknown): boolean {
|
|
5
|
+
if (value === null || typeof value !== 'object') return false;
|
|
6
|
+
if (Object.prototype.toString.call(value) !== objectTag) return false;
|
|
7
|
+
|
|
8
|
+
const proto = Object.getPrototypeOf(value);
|
|
9
|
+
if (proto === null) return true;
|
|
10
|
+
|
|
11
|
+
const ctor =
|
|
12
|
+
Object.prototype.hasOwnProperty.call(proto, 'constructor') &&
|
|
13
|
+
proto.constructor;
|
|
14
|
+
return (
|
|
15
|
+
typeof ctor === 'function' &&
|
|
16
|
+
Function.prototype.toString.call(ctor) === objectCtorString
|
|
17
|
+
);
|
|
5
18
|
}
|