@vope/utils 1.6.8 → 1.7.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/dist/async-lock.d.ts +27 -0
- package/dist/async-lock.js +40 -0
- package/dist/calc.d.ts +18 -7
- package/dist/calc.js +80 -10
- package/dist/disable-enumerable.d.ts +8 -0
- package/dist/disable-enumerable.js +13 -0
- package/dist/encoding.d.ts +1 -0
- package/dist/index-sort.d.ts +7 -0
- package/dist/index-sort.js +34 -0
- package/dist/index.cjs.js +246 -67
- package/dist/index.d.ts +4 -1
- package/dist/index.js +16 -10
- package/dist/memory/basic.d.ts +46 -11
- package/dist/memory/basic.js +47 -27
- package/dist/memory/list.d.ts +2 -3
- package/dist/memory/list.js +3 -2
- package/dist/memory/power.d.ts +2 -3
- package/dist/memory/power.js +3 -2
- package/dist/memory/simple.d.ts +1 -2
- package/dist/subscriber.js +1 -1
- package/package.json +81 -81
- package/dist/memory/type.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
24
|
-
import { default as
|
|
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
|
|
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
|
-
|
|
45
|
+
default4 as DicRollup,
|
|
43
46
|
FlexTable,
|
|
44
47
|
InvalidUnit,
|
|
45
48
|
MemoryBasic,
|
|
46
49
|
MemoryList,
|
|
47
50
|
MemoryPower,
|
|
48
51
|
MemorySimple,
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
default8 as Neo4j,
|
|
53
|
+
default7 as Neo4jAhchors,
|
|
51
54
|
RangeUnit,
|
|
52
|
-
|
|
55
|
+
default9 as Subscriber,
|
|
53
56
|
Union,
|
|
54
57
|
WeekLastUnit,
|
|
55
58
|
WildcardUnit,
|
|
56
|
-
default2 as
|
|
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,
|
package/dist/memory/basic.d.ts
CHANGED
|
@@ -1,36 +1,71 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
22
|
-
|
|
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
|
|
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
|
-
|
|
65
|
+
/**
|
|
66
|
+
* 添加数据
|
|
67
|
+
*/
|
|
68
|
+
push(...values: T[]): this;
|
|
34
69
|
/**
|
|
35
70
|
* 返回位于指定索引处的项
|
|
36
71
|
*/
|
package/dist/memory/basic.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
15
|
-
|
|
23
|
+
#emit;
|
|
24
|
+
[LIST_SYMBOL] = [];
|
|
25
|
+
[MEMORYS_SYMBOL] = /* @__PURE__ */ new Map();
|
|
16
26
|
/**
|
|
17
27
|
* 返回存储长度
|
|
18
28
|
*/
|
|
19
29
|
get size() {
|
|
20
|
-
return this.
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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 =
|
|
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
|
|
56
|
+
const list = this[LIST_SYMBOL];
|
|
42
57
|
if (index < 0) {
|
|
43
58
|
index += list.length;
|
|
44
59
|
}
|
|
45
|
-
return
|
|
60
|
+
return list.at(index);
|
|
46
61
|
}
|
|
47
62
|
/**
|
|
48
63
|
* 遍历所有存储数据(按入栈顺序)
|
|
49
64
|
*/
|
|
50
65
|
forEach(callback) {
|
|
51
|
-
this.
|
|
66
|
+
this[LIST_SYMBOL].forEach(callback);
|
|
52
67
|
return this;
|
|
53
68
|
}
|
|
54
69
|
/**
|
|
55
70
|
* 遍历所有存储类型
|
|
56
71
|
*/
|
|
57
72
|
forType(callback) {
|
|
58
|
-
const
|
|
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.
|
|
85
|
+
return this[LIST_SYMBOL].some(callback);
|
|
70
86
|
}
|
|
71
87
|
/**
|
|
72
88
|
* map(按入栈顺序)
|
|
73
89
|
*/
|
|
74
90
|
map(callback) {
|
|
75
|
-
return this.
|
|
91
|
+
return this[LIST_SYMBOL].map(callback);
|
|
76
92
|
}
|
|
77
93
|
/**
|
|
78
94
|
* reduce(按入栈顺序)
|
|
79
95
|
*/
|
|
80
96
|
reduce(callback, initialValue) {
|
|
81
|
-
return this.
|
|
97
|
+
return this[LIST_SYMBOL].reduce(callback, initialValue);
|
|
82
98
|
}
|
|
83
99
|
/**
|
|
84
100
|
* 判断存储是否包含指定类型
|
|
85
101
|
*/
|
|
86
102
|
includes(type) {
|
|
87
|
-
return this.
|
|
103
|
+
return this[MEMORYS_SYMBOL].has(type);
|
|
88
104
|
}
|
|
89
105
|
/**
|
|
90
106
|
* 获取指定类型存储数据
|
|
91
107
|
*/
|
|
92
108
|
get(type) {
|
|
93
|
-
const memory = this.
|
|
94
|
-
return memory === void 0 ? null : this.#reflex(memory).map((count) => this
|
|
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
|
|
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
|
|
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
|
|
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
|
|
154
|
-
this
|
|
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
|
|
162
|
-
this.
|
|
180
|
+
this[LIST_SYMBOL] = [];
|
|
181
|
+
this[MEMORYS_SYMBOL].clear();
|
|
182
|
+
this.#emit?.(RESET, []);
|
|
163
183
|
}
|
|
164
184
|
}
|
|
165
185
|
export {
|
package/dist/memory/list.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/memory/list.js
CHANGED
|
@@ -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
|
}
|
package/dist/memory/power.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/memory/power.js
CHANGED
|
@@ -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
|
}
|
package/dist/memory/simple.d.ts
CHANGED
|
@@ -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
|
};
|
package/dist/subscriber.js
CHANGED
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vope/utils",
|
|
3
|
-
"version": "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.
|
|
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.0",
|
|
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
|
+
}
|
package/dist/memory/type.d.ts
DELETED