mol_key 0.0.1499 → 0.0.1500
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/README.md +1 -1
- package/node.d.ts +1 -5
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +1 -56
- package/node.js.map +1 -1
- package/node.mjs +1 -56
- package/node.test.js +1 -4151
- package/node.test.js.map +1 -1
- package/package.json +2 -3
- package/web.d.ts +1 -5
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +1 -56
- package/web.js.map +1 -1
- package/web.mjs +1 -56
- package/web.test.js +1 -1500
- package/web.test.js.map +1 -1
package/README.md
CHANGED
package/node.d.ts
CHANGED
|
@@ -15,12 +15,8 @@ declare namespace $ {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
declare namespace $ {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare namespace $ {
|
|
18
|
+
const $mol_key_handle: unique symbol;
|
|
22
19
|
const $mol_key_store: WeakMap<object, string>;
|
|
23
|
-
function $mol_key<Value>(value: Value): string;
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
export = $;
|
package/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.d.ts","
|
|
1
|
+
{"version":3,"sources":["../../../mam.d.ts","../key.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA","sourcesContent":[null,null]}
|
package/node.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/key/key.ts","mol/key/README.md"],"mods":{},"deps_in":{"mol":{"mol/key":-999},"":{"mol":-999}},"deps_out":{"mol/key":{"mol":-999},"mol":{"":-999}},"sloc":{"ts":17,"LICENSE":113,"md":481,"js":9,"json":82,"tree":41,"CNAME":1},"deps":{"mol/key":{"..":-999,"/mol/key/handle":-1,"/mol/key/store":-1},"mol":{"..":-999},"":{}}}
|
package/node.js
CHANGED
|
@@ -32,63 +32,8 @@ $.$$ = $
|
|
|
32
32
|
"use strict";
|
|
33
33
|
var $;
|
|
34
34
|
(function ($) {
|
|
35
|
-
|
|
36
|
-
for (;;) {
|
|
37
|
-
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
38
|
-
if (exists(id))
|
|
39
|
-
continue;
|
|
40
|
-
return id;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
$.$mol_guid = $mol_guid;
|
|
44
|
-
})($ || ($ = {}));
|
|
45
|
-
|
|
46
|
-
;
|
|
47
|
-
"use strict";
|
|
48
|
-
var $;
|
|
49
|
-
(function ($) {
|
|
35
|
+
$.$mol_key_handle = Symbol.for('$mol_key_handle');
|
|
50
36
|
$.$mol_key_store = new WeakMap();
|
|
51
|
-
const TypedArray = Object.getPrototypeOf(Uint8Array);
|
|
52
|
-
function $mol_key(value) {
|
|
53
|
-
if (typeof value === 'bigint')
|
|
54
|
-
return value.toString() + 'n';
|
|
55
|
-
if (typeof value === 'symbol')
|
|
56
|
-
return value.description;
|
|
57
|
-
if (!value)
|
|
58
|
-
return JSON.stringify(value);
|
|
59
|
-
if (typeof value !== 'object' && typeof value !== 'function')
|
|
60
|
-
return JSON.stringify(value);
|
|
61
|
-
return JSON.stringify(value, (field, value) => {
|
|
62
|
-
if (typeof value === 'bigint')
|
|
63
|
-
return value.toString() + 'n';
|
|
64
|
-
if (typeof value === 'symbol')
|
|
65
|
-
return value.description;
|
|
66
|
-
if (!value)
|
|
67
|
-
return value;
|
|
68
|
-
if (typeof value !== 'object' && typeof value !== 'function')
|
|
69
|
-
return value;
|
|
70
|
-
if (Array.isArray(value))
|
|
71
|
-
return value;
|
|
72
|
-
const proto = Reflect.getPrototypeOf(value);
|
|
73
|
-
if (!proto)
|
|
74
|
-
return value;
|
|
75
|
-
if (Reflect.getPrototypeOf(proto) === null)
|
|
76
|
-
return value;
|
|
77
|
-
if ('toJSON' in value)
|
|
78
|
-
return value;
|
|
79
|
-
if (value instanceof RegExp)
|
|
80
|
-
return value.toString();
|
|
81
|
-
if (value instanceof TypedArray)
|
|
82
|
-
return [...value];
|
|
83
|
-
let key = $.$mol_key_store.get(value);
|
|
84
|
-
if (key)
|
|
85
|
-
return key;
|
|
86
|
-
key = $mol_guid();
|
|
87
|
-
$.$mol_key_store.set(value, key);
|
|
88
|
-
return key;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
$.$mol_key = $mol_key;
|
|
92
37
|
})($ || ($ = {}));
|
|
93
38
|
|
|
94
39
|
|
package/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["-","../../../mam.ts","../../../mol/
|
|
1
|
+
{"version":3,"sources":["-","../../../mam.ts","../../../mol/key/key.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAQV;AARD,WAAU,CAAC;AAQX,CAAC,EARS,CAAC,KAAD,CAAC,QAQV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADflB;AACA;AACA;;;;;;;;;;;;;;;AEFA,IAAU,CAAC,CAKV;AALD,WAAU,CAAC;IAEG,iBAAe,GAAG,MAAM,CAAC,GAAG,CAAE,iBAAiB,CAAE,CAAA;IACjD,gBAAc,GAAG,IAAI,OAAO,EAAoB,CAAA;AAE9D,CAAC,EALS,CAAC,KAAD,CAAC,QAKV;;","sourcesContent":[null,"Error.stackTraceLimit = 50;\n\ndeclare let _$_: { new(): {} } & typeof globalThis\ndeclare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {\n\t\tstatic $: $\n\t}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\t\n\texport const $mol_key_handle = Symbol.for( '$mol_key_handle' )\n\texport const $mol_key_store = new WeakMap< object, string >()\n\t\n}\n"]}
|
package/node.mjs
CHANGED
|
@@ -32,63 +32,8 @@ $.$$ = $
|
|
|
32
32
|
"use strict";
|
|
33
33
|
var $;
|
|
34
34
|
(function ($) {
|
|
35
|
-
|
|
36
|
-
for (;;) {
|
|
37
|
-
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
38
|
-
if (exists(id))
|
|
39
|
-
continue;
|
|
40
|
-
return id;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
$.$mol_guid = $mol_guid;
|
|
44
|
-
})($ || ($ = {}));
|
|
45
|
-
|
|
46
|
-
;
|
|
47
|
-
"use strict";
|
|
48
|
-
var $;
|
|
49
|
-
(function ($) {
|
|
35
|
+
$.$mol_key_handle = Symbol.for('$mol_key_handle');
|
|
50
36
|
$.$mol_key_store = new WeakMap();
|
|
51
|
-
const TypedArray = Object.getPrototypeOf(Uint8Array);
|
|
52
|
-
function $mol_key(value) {
|
|
53
|
-
if (typeof value === 'bigint')
|
|
54
|
-
return value.toString() + 'n';
|
|
55
|
-
if (typeof value === 'symbol')
|
|
56
|
-
return value.description;
|
|
57
|
-
if (!value)
|
|
58
|
-
return JSON.stringify(value);
|
|
59
|
-
if (typeof value !== 'object' && typeof value !== 'function')
|
|
60
|
-
return JSON.stringify(value);
|
|
61
|
-
return JSON.stringify(value, (field, value) => {
|
|
62
|
-
if (typeof value === 'bigint')
|
|
63
|
-
return value.toString() + 'n';
|
|
64
|
-
if (typeof value === 'symbol')
|
|
65
|
-
return value.description;
|
|
66
|
-
if (!value)
|
|
67
|
-
return value;
|
|
68
|
-
if (typeof value !== 'object' && typeof value !== 'function')
|
|
69
|
-
return value;
|
|
70
|
-
if (Array.isArray(value))
|
|
71
|
-
return value;
|
|
72
|
-
const proto = Reflect.getPrototypeOf(value);
|
|
73
|
-
if (!proto)
|
|
74
|
-
return value;
|
|
75
|
-
if (Reflect.getPrototypeOf(proto) === null)
|
|
76
|
-
return value;
|
|
77
|
-
if ('toJSON' in value)
|
|
78
|
-
return value;
|
|
79
|
-
if (value instanceof RegExp)
|
|
80
|
-
return value.toString();
|
|
81
|
-
if (value instanceof TypedArray)
|
|
82
|
-
return [...value];
|
|
83
|
-
let key = $.$mol_key_store.get(value);
|
|
84
|
-
if (key)
|
|
85
|
-
return key;
|
|
86
|
-
key = $mol_guid();
|
|
87
|
-
$.$mol_key_store.set(value, key);
|
|
88
|
-
return key;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
$.$mol_key = $mol_key;
|
|
92
37
|
})($ || ($ = {}));
|
|
93
38
|
|
|
94
39
|
|