@vope/utils 1.6.8 → 1.7.1

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.js CHANGED
@@ -1,4 +1,5 @@
1
- import { isCalc, default as default2 } from "./calc";
1
+ import { default as default2 } from "./async-lock";
2
+ import { isCalc, default as default3 } from "./calc";
2
3
  import { clamp } from "./clamp";
3
4
  import { classnames } from "./classnames";
4
5
  import { compareVersion } from "./compare/version";
@@ -8,8 +9,10 @@ import { hash8object } from "./convert/object";
8
9
  import { hash8strings } from "./convert/strings";
9
10
  import { weekDic, default_max_second, default_min_second, default_max_minute, default_min_minute, default_max_hour, default_min_hour, default_max_day, default_min_day, default_max_month, default_min_month, default_max_week, default_min_week, createCronRegexText, InvalidUnit, isInvalidUnit, DayLastUnit, isDayLastUnit, WeekLastUnit, isWeekLastUnit, WildcardUnit, isWildcardUnit, RangeUnit, isRangeUnit, AggUnit, isAggUnit, Cron } from "./cron";
10
11
  import { desensEncrypt, desensDecrypt, desensReplace } from "./desens";
11
- import { default as default3 } from "./dic";
12
+ import { default as default4 } from "./dic";
13
+ import { default as default5 } from "./disable-enumerable";
12
14
  import { getEncoding } from "./encoding";
15
+ import { default as default6 } from "./index-sort";
13
16
  import { inputRegex } from "./input-regex";
14
17
  import { isClass } from "./is/class";
15
18
  import { isEmpty } from "./is/empty";
@@ -20,8 +23,8 @@ import { MemoryBasic } from "./memory/basic";
20
23
  import { MemoryList } from "./memory/list";
21
24
  import { MemoryPower } from "./memory/power";
22
25
  import { MemorySimple } from "./memory/simple";
23
- import { default as default4 } from "./neo4j-anchors";
24
- import { default as default5 } from "./neo4j";
26
+ import { default as default7 } from "./neo4j-anchors";
27
+ import { default as default8 } from "./neo4j";
25
28
  import { once } from "./once";
26
29
  import { parseNum } from "./parse/num";
27
30
  import { deconPowersSum } from "./power/decon";
@@ -29,7 +32,7 @@ import { rotateAngle } from "./rotate/angle";
29
32
  import { rotateRad } from "./rotate/rad";
30
33
  import { cubeURLParams, flatURLParams } from "./serialize/url-params";
31
34
  import { css } from "./style/css";
32
- import { default as default6 } from "./subscriber";
35
+ import { default as default9 } from "./subscriber";
33
36
  import { FlexTable } from "./table/flex";
34
37
  import { Union } from "./union";
35
38
  import { joinPaths } from "./url/join";
@@ -39,21 +42,22 @@ export {
39
42
  AggUnit,
40
43
  Cron,
41
44
  DayLastUnit,
42
- default3 as DicRollup,
45
+ default4 as DicRollup,
43
46
  FlexTable,
44
47
  InvalidUnit,
45
48
  MemoryBasic,
46
49
  MemoryList,
47
50
  MemoryPower,
48
51
  MemorySimple,
49
- default5 as Neo4j,
50
- default4 as Neo4jAhchors,
52
+ default8 as Neo4j,
53
+ default7 as Neo4jAhchors,
51
54
  RangeUnit,
52
- default6 as Subscriber,
55
+ default9 as Subscriber,
53
56
  Union,
54
57
  WeekLastUnit,
55
58
  WildcardUnit,
56
- default2 as calc,
59
+ default2 as asyncLock,
60
+ default3 as calc,
57
61
  clamp,
58
62
  classnames,
59
63
  compareVersion,
@@ -78,11 +82,13 @@ export {
78
82
  desensDecrypt,
79
83
  desensEncrypt,
80
84
  desensReplace,
85
+ default5 as disableEnumerable,
81
86
  flatURLParams,
82
87
  getEncoding,
83
88
  hash8json,
84
89
  hash8object,
85
90
  hash8strings,
91
+ default6 as indexSort,
86
92
  inputRegex,
87
93
  isAggUnit,
88
94
  isCalc,
@@ -1,36 +1,71 @@
1
- import type { Memory } from './type';
2
- interface Config<Reactor> {
1
+ import type { GetGivenProps } from '@vope/types';
2
+ declare const PUSH = 1;
3
+ declare const RESET = 2;
4
+ declare const DELETE = 0;
5
+ export declare namespace Memory {
6
+ type Type = string | number | symbol;
7
+ type Pitch<Data, Type> = (Data extends object ? GetGivenProps<Data, Type> : never) | ((data: Data) => Type);
8
+ interface Emit<T> {
9
+ (type: typeof PUSH, data: T): void;
10
+ (type: typeof RESET, data: T[]): void;
11
+ (type: typeof DELETE, index: number): void;
12
+ }
13
+ }
14
+ interface Mount<T> {
3
15
  /**
4
- * 定义数据如何挂载到存储中
5
16
  * @param index 当前存入数据对应的角标
6
17
  * @param reactor 当前存入数据对应存储单元
7
18
  */
8
- mount(index: number, reactor?: Reactor): Reactor;
19
+ (index: number, reactor?: T): T;
20
+ }
21
+ interface Reflex<T> {
22
+ /**
23
+ * @param reactor 存储单元
24
+ */
25
+ (reactor: T): number[];
26
+ }
27
+ interface Config<T, Reactor> {
28
+ /**
29
+ * 定义数据如何挂载到存储中
30
+ */
31
+ mount: Mount<Reactor>;
9
32
  /**
10
33
  * 定义存储单元和存储关系
11
34
  * @param reactor 存储单元
12
35
  */
13
- reflex(reactor: Reactor): number[];
36
+ reflex: Reflex<Reactor>;
37
+ /**
38
+ * 存储变化触发(用于同步数据)
39
+ */
40
+ emit?: Memory.Emit<T>;
14
41
  }
42
+ declare const LIST_SYMBOL: unique symbol;
43
+ declare const MEMORYS_SYMBOL: unique symbol;
15
44
  /**
16
45
  * 分类存储(通过继承,可用于拓展存储方式)
17
46
  */
18
47
  export declare class MemoryBasic<T, Reactor, Type extends Memory.Type> {
19
48
  #private;
20
49
  protected key: Memory.Pitch<T, Type>;
21
- protected list: T[];
22
- protected memorys: Map<Type, Reactor>;
50
+ static readonly PUSH = 1;
51
+ static readonly RESET = 2;
52
+ static readonly DELETE = 0;
53
+ protected [LIST_SYMBOL]: T[];
54
+ protected [MEMORYS_SYMBOL]: Map<Type, Reactor>;
23
55
  /**
24
56
  * 返回存储长度
25
57
  */
26
58
  get size(): number;
27
59
  /**
28
- * @param key 用于对数据进行分类的key
29
- * @param config
60
+ * @param key 用于对数据进行分类的key
61
+ * @param config 配置项
30
62
  */
31
- constructor(key: Memory.Pitch<T, Type>, config: Config<Reactor>);
63
+ constructor(key: Memory.Pitch<T, Type>, config: Config<T, Reactor>);
32
64
  protected getType(data: T): Type;
33
- push(...list: T[]): this;
65
+ /**
66
+ * 添加数据
67
+ */
68
+ push(...values: T[]): this;
34
69
  /**
35
70
  * 返回位于指定索引处的项
36
71
  */
@@ -1,36 +1,51 @@
1
1
  import { hash8strings } from "../convert/strings";
2
+ const PUSH = 1;
3
+ const RESET = 2;
4
+ const DELETE = 0;
5
+ const LIST_SYMBOL = Symbol();
6
+ const MEMORYS_SYMBOL = Symbol();
2
7
  class MemoryBasic {
3
8
  /**
4
- * @param key 用于对数据进行分类的key
5
- * @param config
9
+ * @param key 用于对数据进行分类的key
10
+ * @param config 配置项
6
11
  */
7
12
  constructor(key, config) {
8
13
  this.key = key;
9
14
  this.#mount = config.mount;
10
15
  this.#reflex = config.reflex;
16
+ this.#emit = config.emit;
11
17
  }
18
+ static PUSH = PUSH;
19
+ static RESET = RESET;
20
+ static DELETE = DELETE;
12
21
  #mount;
13
22
  #reflex;
14
- list = [];
15
- memorys = /* @__PURE__ */ new Map();
23
+ #emit;
24
+ [LIST_SYMBOL] = [];
25
+ [MEMORYS_SYMBOL] = /* @__PURE__ */ new Map();
16
26
  /**
17
27
  * 返回存储长度
18
28
  */
19
29
  get size() {
20
- return this.list.length;
30
+ return this[LIST_SYMBOL].length;
21
31
  }
22
32
  getType(data) {
23
33
  const { key } = this;
24
34
  return typeof key === "function" ? key(data) : data[key];
25
35
  }
26
- push(...list) {
27
- const { memorys } = this;
28
- list.forEach((data) => {
36
+ /**
37
+ * 添加数据
38
+ */
39
+ push(...values) {
40
+ const memorys = this[MEMORYS_SYMBOL];
41
+ const list = this[LIST_SYMBOL];
42
+ values.forEach((data) => {
29
43
  const type = this.getType(data);
30
44
  const memory = memorys.get(type);
31
- const index = this.list.push(data) - 1;
45
+ const index = list.push(data) - 1;
32
46
  const result = this.#mount(index, memory);
33
47
  memory === result || memorys.set(type, result);
48
+ this.#emit?.(PUSH, data);
34
49
  });
35
50
  return this;
36
51
  }
@@ -38,24 +53,25 @@ class MemoryBasic {
38
53
  * 返回位于指定索引处的项
39
54
  */
40
55
  at(index) {
41
- const { list } = this;
56
+ const list = this[LIST_SYMBOL];
42
57
  if (index < 0) {
43
58
  index += list.length;
44
59
  }
45
- return this.list.at(index);
60
+ return list.at(index);
46
61
  }
47
62
  /**
48
63
  * 遍历所有存储数据(按入栈顺序)
49
64
  */
50
65
  forEach(callback) {
51
- this.list.forEach(callback);
66
+ this[LIST_SYMBOL].forEach(callback);
52
67
  return this;
53
68
  }
54
69
  /**
55
70
  * 遍历所有存储类型
56
71
  */
57
72
  forType(callback) {
58
- const { memorys, list } = this;
73
+ const memorys = this[MEMORYS_SYMBOL];
74
+ const list = this[LIST_SYMBOL];
59
75
  for (const [type, memory] of memorys) {
60
76
  const caches = this.#reflex(memory).map((index) => list[index]);
61
77
  callback(caches, type);
@@ -66,38 +82,39 @@ class MemoryBasic {
66
82
  * some(按入栈顺序)
67
83
  */
68
84
  some(callback) {
69
- return this.list.some(callback);
85
+ return this[LIST_SYMBOL].some(callback);
70
86
  }
71
87
  /**
72
88
  * map(按入栈顺序)
73
89
  */
74
90
  map(callback) {
75
- return this.list.map(callback);
91
+ return this[LIST_SYMBOL].map(callback);
76
92
  }
77
93
  /**
78
94
  * reduce(按入栈顺序)
79
95
  */
80
96
  reduce(callback, initialValue) {
81
- return this.list.reduce(callback, initialValue);
97
+ return this[LIST_SYMBOL].reduce(callback, initialValue);
82
98
  }
83
99
  /**
84
100
  * 判断存储是否包含指定类型
85
101
  */
86
102
  includes(type) {
87
- return this.memorys.has(type);
103
+ return this[MEMORYS_SYMBOL].has(type);
88
104
  }
89
105
  /**
90
106
  * 获取指定类型存储数据
91
107
  */
92
108
  get(type) {
93
- const memory = this.memorys.get(type);
94
- return memory === void 0 ? null : this.#reflex(memory).map((count) => this.list[count]);
109
+ const memory = this[MEMORYS_SYMBOL].get(type);
110
+ return memory === void 0 ? null : this.#reflex(memory).map((count) => this[LIST_SYMBOL][count]);
95
111
  }
96
112
  /**
97
113
  * 删除指定存储数据
98
114
  */
99
115
  delete(data) {
100
- const { memorys, list } = this;
116
+ const memorys = this[MEMORYS_SYMBOL];
117
+ const list = this[LIST_SYMBOL];
101
118
  let index = -1;
102
119
  if (!list.some((value, i) => {
103
120
  if (data === value) {
@@ -133,33 +150,36 @@ class MemoryBasic {
133
150
  memorys.set(type, reactor);
134
151
  }
135
152
  }
153
+ this.#emit?.(DELETE, index);
136
154
  return this;
137
155
  }
138
156
  /**
139
157
  * 删除指定类型存储数据
140
158
  */
141
159
  deleteType(type) {
142
- const { memorys, list } = this;
160
+ const memorys = this[MEMORYS_SYMBOL];
161
+ const list = this[LIST_SYMBOL];
143
162
  if (!memorys.has(type)) return this;
144
163
  const local = hash8strings(this.#reflex(memorys.get(type)));
145
- const Memory = this.constructor;
146
- const imitator = new Memory(this.key, {
164
+ const imitator = new MemoryBasic(this.key, {
147
165
  mount: this.#mount,
148
166
  reflex: this.#reflex
149
167
  });
150
168
  list.forEach((data, index) => {
151
169
  index in local || imitator.push(data);
152
170
  });
153
- this.list = imitator.list;
154
- this.memorys = imitator.memorys;
171
+ const tmp = this[LIST_SYMBOL] = imitator[LIST_SYMBOL];
172
+ this[MEMORYS_SYMBOL] = imitator[MEMORYS_SYMBOL];
173
+ this.#emit?.(RESET, tmp.slice(0));
155
174
  return this;
156
175
  }
157
176
  /**
158
177
  * 清理存储
159
178
  */
160
179
  clear() {
161
- this.list = [];
162
- this.memorys.clear();
180
+ this[LIST_SYMBOL] = [];
181
+ this[MEMORYS_SYMBOL].clear();
182
+ this.#emit?.(RESET, []);
163
183
  }
164
184
  }
165
185
  export {
@@ -1,8 +1,7 @@
1
- import { MemoryBasic } from './basic';
2
- import type { Memory } from './type';
1
+ import { MemoryBasic, type Memory } from './basic';
3
2
  /**
4
3
  * 分类存储(基于普通的键值存储)
5
4
  */
6
5
  export declare class MemoryList<T, Type extends Memory.Type = Memory.Type> extends MemoryBasic<T, number[], Type> {
7
- constructor(key: Memory.Pitch<T, Type>);
6
+ constructor(key: Memory.Pitch<T, Type>, emit?: Memory.Emit<T>);
8
7
  }
@@ -1,9 +1,10 @@
1
1
  import { MemoryBasic } from "./basic";
2
2
  class MemoryList extends MemoryBasic {
3
- constructor(key) {
3
+ constructor(key, emit) {
4
4
  super(key, {
5
5
  mount: (index, reactor) => reactor ? (reactor.push(index), reactor) : [index],
6
- reflex: (reactor) => reactor
6
+ reflex: (reactor) => reactor,
7
+ emit
7
8
  });
8
9
  }
9
10
  }
@@ -1,8 +1,7 @@
1
- import { MemoryBasic } from './basic';
2
- import type { Memory } from './type';
1
+ import { MemoryBasic, type Memory } from './basic';
3
2
  /**
4
3
  * 分类存储(基于2的n次幂之和构建唯一键进行存储)
5
4
  */
6
5
  export declare class MemoryPower<T, Type extends Memory.Type = Memory.Type> extends MemoryBasic<T, number, Type> {
7
- constructor(key: Memory.Pitch<T, Type>);
6
+ constructor(key: Memory.Pitch<T, Type>, emit?: Memory.Emit<T>);
8
7
  }
@@ -1,10 +1,11 @@
1
1
  import { deconPowersSum } from "../power/decon";
2
2
  import { MemoryBasic } from "./basic";
3
3
  class MemoryPower extends MemoryBasic {
4
- constructor(key) {
4
+ constructor(key, emit) {
5
5
  super(key, {
6
6
  mount: (index, reactor) => (reactor || 0) + 2 ** index,
7
- reflex: (reactor) => deconPowersSum(reactor, "asc")
7
+ reflex: (reactor) => deconPowersSum(reactor, "asc"),
8
+ emit
8
9
  });
9
10
  }
10
11
  }
@@ -1,6 +1,5 @@
1
1
  import type { Assign } from '@vope/types';
2
- import { MemoryBasic } from './basic';
3
- import type { Memory } from './type';
2
+ import { MemoryBasic, type Memory } from './basic';
4
3
  type Transform<T, V> = {
5
4
  [P in keyof T]: T[P] extends (...args: any) => any ? (...args: Parameters<T[P]>) => ReturnType<T[P]> extends T ? V : ReturnType<T[P]> : T[P];
6
5
  };
@@ -14,7 +13,7 @@ type Basic<T, V, Type extends Memory.Type> = Assign<Transform<Omit<MemoryBasic<T
14
13
  export declare class MemorySimple<T, Type extends Memory.Type> implements Basic<T, number, Type> {
15
14
  #private;
16
15
  get size(): number;
17
- constructor(key: Memory.Pitch<T, Type>);
16
+ constructor(key: Memory.Pitch<T, Type>, emit?: Memory.Emit<T>);
18
17
  /**
19
18
  * 返回位于指定索引处的项
20
19
  */
@@ -5,11 +5,12 @@ class MemorySimple {
5
5
  get size() {
6
6
  return this.#memory.size;
7
7
  }
8
- constructor(key) {
8
+ constructor(key, emit) {
9
9
  this.#key = key;
10
10
  this.#memory = new MemoryBasic(key, {
11
11
  mount: (index) => index,
12
- reflex: (reactor) => [reactor]
12
+ reflex: (reactor) => [reactor],
13
+ emit
13
14
  });
14
15
  }
15
16
  #getType(data) {
@@ -46,7 +46,7 @@ class Subscriber {
46
46
  listeners[name].splice(index, 1);
47
47
  return true;
48
48
  }
49
- }) && once[name].some((value, index) => {
49
+ }) && once[name]?.some((value, index) => {
50
50
  if (value === count) {
51
51
  listeners[name].splice(index, 1);
52
52
  return true;
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "@vope/utils",
3
- "version": "1.6.8",
4
- "description": "",
5
- "publishConfig": {
6
- "access": "public",
7
- "registry": "https://registry.npmjs.org/"
8
- },
9
- "types": "./dist/index.d.ts",
10
- "typings": "./dist/index.d.ts",
11
- "module": "./dist/index.js",
12
- "main": "./dist/index.js",
13
- "scripts": {
14
- "start": "esbuild ./start.ts --outfile=start.cjs --format=cjs & node ./start.cjs",
15
- "poststart": "esbuild ./pre.ts --outfile=pre.cjs --format=cjs & node ./pre.cjs",
16
- "build": "npm run start & node ./build.cjs",
17
- "premocha": "node ./build.cjs --type=test",
18
- "mocha": "mocha __tests/**/*.js",
19
- "test": "npm run mocha",
20
- "prepublishOnly": "npm run build & npm run test",
21
- "debug": "npm run start & npm run premocha",
22
- "clean": "rimraf start.cjs pre.cjs build.cjs src/index.ts dist/ __tests/ __examples/ sub_storage/"
23
- },
24
- "exports": {
25
- ".": {
26
- "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js",
28
- "require": "./dist/index.cjs.js"
29
- },
30
- "./storage": {
31
- "types": "./sub_storage/offline.d.ts",
32
- "import": "./sub_storage/offline.js",
33
- "require": "./sub_storage/offline.cjs.js"
34
- }
35
- },
36
- "author": "vope",
37
- "license": "ISC",
38
- "files": [
39
- "dist",
40
- "sub_storage"
41
- ],
42
- "devDependencies": {
43
- "@babel/parser": "^7.26.9",
44
- "@babel/traverse": "^7.26.9",
45
- "@babel/types": "^7.26.9",
46
- "@rollup/plugin-alias": "^5.1.1",
47
- "@rollup/plugin-commonjs": "^28.0.2",
48
- "@rollup/plugin-json": "^6.1.0",
49
- "@rollup/plugin-node-resolve": "^16.0.0",
50
- "@rollup/plugin-typescript": "^12.1.2",
51
- "@types/babel__traverse": "^7.20.6",
52
- "@types/mocha": "^10.0.6",
53
- "@types/node": "^22.13.5",
54
- "@types/sm-crypto": "^0.3.4",
55
- "esbuild": "^0.25.0",
56
- "glob": "^11.0.1",
57
- "iconv-lite": "^0.6.3",
58
- "mocha": "^10.2.0",
59
- "puppeteer": "^24.3.0",
60
- "rimraf": "^5.0.5",
61
- "rollup": "^4.34.8",
62
- "tslib": "^2.8.1",
63
- "typescript": "^5.9.2",
64
- "uuid": "^11.1.0"
65
- },
66
- "dependencies": {
67
- "@type-challenges/utils": "^0.1.1",
68
- "@types/lodash-es": "^4.17.12",
69
- "@vope/types": "^1.2.0",
70
- "csstype": "^3.1.3",
71
- "localforage": "^1.10.0",
72
- "lodash-es": "^4.17.21",
73
- "sm-crypto": "^0.3.13"
74
- },
75
- "pnpm": {
76
- "onlyBuiltDependencies": [
77
- "esbuild",
78
- "puppeteer"
79
- ]
80
- }
81
- }
1
+ {
2
+ "name": "@vope/utils",
3
+ "version": "1.7.1",
4
+ "description": "",
5
+ "publishConfig": {
6
+ "access": "public",
7
+ "registry": "https://registry.npmjs.org/"
8
+ },
9
+ "types": "./dist/index.d.ts",
10
+ "typings": "./dist/index.d.ts",
11
+ "module": "./dist/index.js",
12
+ "main": "./dist/index.js",
13
+ "scripts": {
14
+ "start": "esbuild ./start.ts --outfile=start.cjs --format=cjs & node ./start.cjs",
15
+ "poststart": "esbuild ./pre.ts --outfile=pre.cjs --format=cjs & node ./pre.cjs",
16
+ "build": "npm run start & node ./build.cjs",
17
+ "premocha": "node ./build.cjs --type=test",
18
+ "mocha": "mocha __tests/**/*.js",
19
+ "test": "npm run mocha",
20
+ "prepublishOnly": "npm run build & npm run test",
21
+ "debug": "npm run start & npm run premocha",
22
+ "clean": "rimraf start.cjs pre.cjs build.cjs src/index.ts dist/ __tests/ __examples/ sub_storage/"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js",
28
+ "require": "./dist/index.cjs.js"
29
+ },
30
+ "./storage": {
31
+ "types": "./sub_storage/offline.d.ts",
32
+ "import": "./sub_storage/offline.js",
33
+ "require": "./sub_storage/offline.cjs.js"
34
+ }
35
+ },
36
+ "author": "vope",
37
+ "license": "ISC",
38
+ "files": [
39
+ "dist",
40
+ "sub_storage"
41
+ ],
42
+ "devDependencies": {
43
+ "@babel/parser": "^7.26.9",
44
+ "@babel/traverse": "^7.26.9",
45
+ "@babel/types": "^7.26.9",
46
+ "@rollup/plugin-alias": "^5.1.1",
47
+ "@rollup/plugin-commonjs": "^28.0.2",
48
+ "@rollup/plugin-json": "^6.1.0",
49
+ "@rollup/plugin-node-resolve": "^16.0.0",
50
+ "@rollup/plugin-typescript": "^12.1.2",
51
+ "@types/babel__traverse": "^7.20.6",
52
+ "@types/mocha": "^10.0.6",
53
+ "@types/node": "^22.13.5",
54
+ "@types/sm-crypto": "^0.3.4",
55
+ "esbuild": "^0.25.0",
56
+ "glob": "^11.0.1",
57
+ "iconv-lite": "^0.6.3",
58
+ "mocha": "^10.2.0",
59
+ "puppeteer": "^24.3.0",
60
+ "rimraf": "^5.0.5",
61
+ "rollup": "^4.34.8",
62
+ "tslib": "^2.8.1",
63
+ "typescript": "^5.9.2",
64
+ "uuid": "^11.1.0"
65
+ },
66
+ "dependencies": {
67
+ "@type-challenges/utils": "^0.1.1",
68
+ "@types/lodash-es": "^4.17.12",
69
+ "@vope/types": "^1.2.0",
70
+ "csstype": "^3.2.3",
71
+ "localforage": "^1.10.0",
72
+ "lodash-es": "^4.17.21",
73
+ "sm-crypto": "^0.3.13"
74
+ },
75
+ "pnpm": {
76
+ "onlyBuiltDependencies": [
77
+ "esbuild",
78
+ "puppeteer"
79
+ ]
80
+ }
81
+ }
@@ -1,11 +0,0 @@
1
- import { GetGivenProps } from '@vope/types'
2
-
3
- export namespace Memory {
4
- type Type = string | number | symbol
5
-
6
- type Pitch<Data, Type> = (
7
- Data extends object
8
- ? GetGivenProps<Data, Type>
9
- : never
10
- ) | ((data: Data) => Type)
11
- }