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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-jui",
3
- "version": "1.5.3",
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';
@@ -1,5 +1,18 @@
1
- import _isPlainObject from 'lodash-es/isPlainObject.js';
1
+ const objectTag = '[object Object]';
2
+ const objectCtorString = Function.prototype.toString.call(Object);
2
3
 
3
- export function isPlainObject(obj: unknown): boolean {
4
- return _isPlainObject(obj);
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
  }
@@ -1,4 +0,0 @@
1
- export { default as debounce } from 'lodash-es/debounce.js';
2
- export { default as throttle } from 'lodash-es/throttle.js';
3
- export type { DebouncedFunc, DebounceSettings } from 'lodash-es/debounce.js';
4
- export type { ThrottleSettings } from 'lodash-es/throttle.js';