arktype 0.1.4 → 0.2.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/README.md +1 -1
- package/dist/api.cjs +4 -3
- package/dist/api.d.ts +3 -2
- package/dist/api.mjs +2 -1
- package/dist/cjs/nodes/node.js +20 -2
- package/dist/cjs/nodes/predicate.js +2 -0
- package/dist/cjs/nodes/rules/regex.js +4 -42
- package/dist/cjs/nodes/rules/rules.js +15 -11
- package/dist/cjs/parse/definition.js +2 -2
- package/dist/cjs/parse/tuple/morph.js +7 -6
- package/dist/cjs/scopes/cache.js +39 -0
- package/dist/cjs/scopes/jsObjects.js +133 -0
- package/dist/cjs/{main.js → scopes/scope.js} +31 -364
- package/dist/cjs/scopes/standard.js +44 -0
- package/dist/cjs/scopes/tsKeywords.js +113 -0
- package/dist/cjs/scopes/type.js +70 -0
- package/dist/cjs/scopes/validation.js +64 -0
- package/dist/cjs/traverse/problems.js +50 -74
- package/dist/cjs/traverse/traverse.js +25 -3
- package/dist/cjs/utils/numericLiterals.js +1 -0
- package/dist/mjs/nodes/node.js +20 -2
- package/dist/mjs/nodes/predicate.js +1 -0
- package/dist/mjs/nodes/rules/regex.js +3 -41
- package/dist/mjs/nodes/rules/rules.js +16 -12
- package/dist/mjs/parse/definition.js +1 -1
- package/dist/mjs/parse/tuple/morph.js +7 -6
- package/dist/mjs/scopes/cache.js +25 -0
- package/dist/mjs/scopes/jsObjects.js +119 -0
- package/dist/mjs/{main.js → scopes/scope.js} +15 -344
- package/dist/mjs/scopes/standard.js +27 -0
- package/dist/mjs/scopes/tsKeywords.js +99 -0
- package/dist/mjs/scopes/type.js +56 -0
- package/dist/mjs/scopes/validation.js +51 -0
- package/dist/mjs/traverse/problems.js +49 -73
- package/dist/mjs/traverse/traverse.js +26 -4
- package/dist/mjs/utils/numericLiterals.js +1 -1
- package/dist/tsconfig.temp.tsbuildinfo +1 -1
- package/dist/types/nodes/compose.d.ts +1 -1
- package/dist/types/nodes/infer.d.ts +4 -4
- package/dist/types/nodes/node.d.ts +11 -7
- package/dist/types/nodes/predicate.d.ts +43 -54
- package/dist/types/nodes/rules/range.d.ts +1 -1
- package/dist/types/nodes/rules/regex.d.ts +1 -11
- package/dist/types/nodes/rules/rules.d.ts +2 -10
- package/dist/types/parse/definition.d.ts +1 -1
- package/dist/types/parse/string/ast.d.ts +2 -1
- package/dist/types/parse/string/reduce/dynamic.d.ts +1 -1
- package/dist/types/parse/string/reduce/shared.d.ts +1 -1
- package/dist/types/parse/string/reduce/static.d.ts +1 -1
- package/dist/types/parse/string/shift/operand/unenclosed.d.ts +1 -1
- package/dist/types/parse/string/shift/operator/bounds.d.ts +1 -1
- package/dist/types/parse/tuple/morph.d.ts +1 -1
- package/dist/types/parse/tuple/narrow.d.ts +1 -1
- package/dist/types/parse/tuple/tuple.d.ts +1 -1
- package/dist/types/scopes/cache.d.ts +14 -0
- package/dist/types/scopes/jsObjects.d.ts +36 -0
- package/dist/types/scopes/scope.d.ts +76 -0
- package/dist/types/scopes/standard.d.ts +280 -0
- package/dist/types/scopes/tsKeywords.d.ts +32 -0
- package/dist/types/scopes/type.d.ts +53 -0
- package/dist/types/scopes/validation.d.ts +21 -0
- package/dist/types/traverse/problems.d.ts +29 -32
- package/dist/types/traverse/traverse.d.ts +10 -8
- package/dist/types/utils/numericLiterals.d.ts +1 -0
- package/package.json +2 -2
- package/dist/types/main.d.ts +0 -324
package/README.md
CHANGED
package/dist/api.cjs
CHANGED
|
@@ -9,10 +9,11 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
scope: ()=>
|
|
13
|
-
type: ()=>
|
|
12
|
+
scope: ()=>_scopeTs.scope,
|
|
13
|
+
type: ()=>_standardTs.type,
|
|
14
14
|
Problems: ()=>_problemsTs.Problems,
|
|
15
15
|
Problem: ()=>_problemsTs.Problem
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const _scopeTs = require("./cjs/scopes/scope.js");
|
|
18
|
+
const _standardTs = require("./cjs/scopes/standard.js");
|
|
18
19
|
const _problemsTs = require("./cjs/traverse/problems.js");
|
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { scope
|
|
2
|
-
export
|
|
1
|
+
export { scope } from "./types/scopes/scope.js"
|
|
2
|
+
export { type } from "./types/scopes/standard.js"
|
|
3
|
+
export type { Type } from "./types/scopes/type.js"
|
|
3
4
|
export { Problems, Problem } from "./types/traverse/problems.js"
|
package/dist/api.mjs
CHANGED
package/dist/cjs/nodes/node.js
CHANGED
|
@@ -68,11 +68,29 @@ const flattenType = (type)=>{
|
|
|
68
68
|
path: new _pathsTs.Path(),
|
|
69
69
|
lastDomain: "undefined"
|
|
70
70
|
};
|
|
71
|
-
return
|
|
71
|
+
return type.meta.config ? [
|
|
72
|
+
[
|
|
73
|
+
"config",
|
|
74
|
+
{
|
|
75
|
+
config: type.meta.config,
|
|
76
|
+
node: flattenNode(type.node, ctx)
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
] : flattenNode(type.node, ctx);
|
|
72
80
|
};
|
|
73
81
|
const flattenNode = (node, ctx)=>{
|
|
74
82
|
if (typeof node === "string") {
|
|
75
|
-
|
|
83
|
+
const resolution = ctx.type.meta.scope.resolve(node);
|
|
84
|
+
const updatedScopeConfig = resolution.meta.scope !== ctx.type.meta.scope && resolution.meta.scope.config;
|
|
85
|
+
return updatedScopeConfig ? [
|
|
86
|
+
[
|
|
87
|
+
"config",
|
|
88
|
+
{
|
|
89
|
+
config: updatedScopeConfig,
|
|
90
|
+
node: resolution.flat
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
] : resolution.flat;
|
|
76
94
|
}
|
|
77
95
|
const domains = (0, _genericsTs.keysOf)(node);
|
|
78
96
|
if (domains.length === 1) {
|
|
@@ -9,6 +9,7 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
branchIsTransformation: ()=>branchIsTransformation,
|
|
12
13
|
comparePredicates: ()=>comparePredicates,
|
|
13
14
|
predicateIntersection: ()=>predicateIntersection,
|
|
14
15
|
predicateUnion: ()=>predicateUnion,
|
|
@@ -22,6 +23,7 @@ const _branchesTs = require("./branches.js");
|
|
|
22
23
|
const _composeTs = require("./compose.js");
|
|
23
24
|
const _discriminateTs = require("./discriminate.js");
|
|
24
25
|
const _rulesTs = require("./rules/rules.js");
|
|
26
|
+
const branchIsTransformation = (branch)=>"rules" in branch;
|
|
25
27
|
const emptyRulesIfTrue = (predicate)=>predicate === true ? {} : predicate;
|
|
26
28
|
const comparePredicates = (l, r, context)=>{
|
|
27
29
|
if (l === true && r === true) {
|
|
@@ -9,60 +9,22 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
sources: ()=>sources,
|
|
13
12
|
getRegex: ()=>getRegex,
|
|
14
13
|
checkRegex: ()=>checkRegex,
|
|
15
|
-
regexIntersection: ()=>regexIntersection
|
|
16
|
-
isLuhnValid: ()=>isLuhnValid
|
|
14
|
+
regexIntersection: ()=>regexIntersection
|
|
17
15
|
});
|
|
18
16
|
const _composeTs = require("../compose.js");
|
|
19
17
|
const _collapsibleSetTs = require("./collapsibleSet.js");
|
|
20
18
|
const regexCache = {};
|
|
21
|
-
const sources = {
|
|
22
|
-
// Character sets
|
|
23
|
-
alpha: /^[A-Z]*$/i,
|
|
24
|
-
alphanumeric: /^[A-Z\d]*$/i,
|
|
25
|
-
lowercase: /^[a-z]*$/,
|
|
26
|
-
uppercase: /^[A-Z]*$/,
|
|
27
|
-
// https://github.com/validatorjs/validator.js
|
|
28
|
-
creditCard: /^(?:4[0-9]{12}(?:[0-9]{3,6})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12,15}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|^(81[0-9]{14,17}))$/,
|
|
29
|
-
// https://www.regular-expressions.info
|
|
30
|
-
email: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
|
|
31
|
-
// https://github.com/validatorjs/validator.js
|
|
32
|
-
uuid: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
|
|
33
|
-
};
|
|
34
19
|
const getRegex = (source)=>{
|
|
35
20
|
if (!regexCache[source]) {
|
|
36
21
|
regexCache[source] = new RegExp(source);
|
|
37
22
|
}
|
|
38
23
|
return regexCache[source];
|
|
39
24
|
};
|
|
40
|
-
const checkRegex = (data,
|
|
41
|
-
if (!
|
|
42
|
-
state.problems.add("regex", data,
|
|
25
|
+
const checkRegex = (data, source, state)=>{
|
|
26
|
+
if (!getRegex(source).test(data)) {
|
|
27
|
+
state.problems.add("regex", data, state.path.length === 0 && state.type.name !== "type" ? state.type.name : `/${source}/`);
|
|
43
28
|
}
|
|
44
29
|
};
|
|
45
30
|
const regexIntersection = (0, _composeTs.composeIntersection)(_collapsibleSetTs.collapsibleListUnion);
|
|
46
|
-
const isLuhnValid = (creditCardInput)=>{
|
|
47
|
-
const sanitized = creditCardInput.replace(/[- ]+/g, "");
|
|
48
|
-
let sum = 0;
|
|
49
|
-
let digit;
|
|
50
|
-
let tmpNum;
|
|
51
|
-
let shouldDouble;
|
|
52
|
-
for(let i = sanitized.length - 1; i >= 0; i--){
|
|
53
|
-
digit = sanitized.substring(i, i + 1);
|
|
54
|
-
tmpNum = parseInt(digit, 10);
|
|
55
|
-
if (shouldDouble) {
|
|
56
|
-
tmpNum *= 2;
|
|
57
|
-
if (tmpNum >= 10) {
|
|
58
|
-
sum += tmpNum % 10 + 1;
|
|
59
|
-
} else {
|
|
60
|
-
sum += tmpNum;
|
|
61
|
-
}
|
|
62
|
-
} else {
|
|
63
|
-
sum += tmpNum;
|
|
64
|
-
}
|
|
65
|
-
shouldDouble = !shouldDouble;
|
|
66
|
-
}
|
|
67
|
-
return !!(sum % 10 === 0 ? sanitized : false);
|
|
68
|
-
};
|
|
@@ -20,6 +20,7 @@ const _astTs = require("../../parse/string/ast.js");
|
|
|
20
20
|
const _errorsTs = require("../../utils/errors.js");
|
|
21
21
|
const _genericsTs = require("../../utils/generics.js");
|
|
22
22
|
const _composeTs = require("../compose.js");
|
|
23
|
+
const _predicateTs = require("../predicate.js");
|
|
23
24
|
const _classTs = require("./class.js");
|
|
24
25
|
const _collapsibleSetTs = require("./collapsibleSet.js");
|
|
25
26
|
const _divisorTs = require("./divisor.js");
|
|
@@ -27,7 +28,7 @@ const _objectKindTs = require("./objectKind.js");
|
|
|
27
28
|
const _propsTs = require("./props.js");
|
|
28
29
|
const _rangeTs = require("./range.js");
|
|
29
30
|
const _regexTs = require("./regex.js");
|
|
30
|
-
const rulesOf = (branch)=>branch.
|
|
31
|
+
const rulesOf = (branch)=>branch.rules ?? branch;
|
|
31
32
|
const branchIntersection = (l, r, state)=>{
|
|
32
33
|
const lRules = rulesOf(l);
|
|
33
34
|
const rRules = rulesOf(r);
|
|
@@ -36,20 +37,20 @@ const branchIntersection = (l, r, state)=>{
|
|
|
36
37
|
if ("morph" in r) {
|
|
37
38
|
if (l.morph === r.morph) {
|
|
38
39
|
return (0, _composeTs.isEquality)(rulesResult) || (0, _composeTs.isDisjoint)(rulesResult) ? rulesResult : {
|
|
39
|
-
|
|
40
|
+
rules: rulesResult,
|
|
40
41
|
morph: l.morph
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
return state.lastOperator === "&" ? (0, _errorsTs.throwParseError)((0, _astTs.writeImplicitNeverMessage)(state.path, "Intersection", "of morphs")) : {};
|
|
44
45
|
}
|
|
45
46
|
return (0, _composeTs.isDisjoint)(rulesResult) ? rulesResult : {
|
|
46
|
-
|
|
47
|
+
rules: (0, _composeTs.isEquality)(rulesResult) ? l.rules : rulesResult,
|
|
47
48
|
morph: l.morph
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
if ("morph" in r) {
|
|
51
52
|
return (0, _composeTs.isDisjoint)(rulesResult) ? rulesResult : {
|
|
52
|
-
|
|
53
|
+
rules: (0, _composeTs.isEquality)(rulesResult) ? r.rules : rulesResult,
|
|
53
54
|
morph: r.morph
|
|
54
55
|
};
|
|
55
56
|
}
|
|
@@ -74,7 +75,7 @@ const ruleFlatteners = {
|
|
|
74
75
|
for (const source of (0, _genericsTs.listFrom)(rule)){
|
|
75
76
|
entries.push([
|
|
76
77
|
"regex",
|
|
77
|
-
|
|
78
|
+
source
|
|
78
79
|
]);
|
|
79
80
|
}
|
|
80
81
|
},
|
|
@@ -109,6 +110,7 @@ const ruleFlatteners = {
|
|
|
109
110
|
};
|
|
110
111
|
const precedenceMap = {
|
|
111
112
|
// Critical: No other checks are performed if these fail
|
|
113
|
+
config: 0,
|
|
112
114
|
domain: 0,
|
|
113
115
|
value: 0,
|
|
114
116
|
domains: 0,
|
|
@@ -130,12 +132,14 @@ const precedenceMap = {
|
|
|
130
132
|
morph: 4
|
|
131
133
|
};
|
|
132
134
|
const flattenBranch = (branch, ctx)=>{
|
|
133
|
-
if (
|
|
134
|
-
const result = flattenRules(branch.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
if ((0, _predicateTs.branchIsTransformation)(branch)) {
|
|
136
|
+
const result = flattenRules(branch.rules, ctx);
|
|
137
|
+
if (branch.morph) {
|
|
138
|
+
result.push([
|
|
139
|
+
"morph",
|
|
140
|
+
branch.morph
|
|
141
|
+
]);
|
|
142
|
+
}
|
|
139
143
|
return result;
|
|
140
144
|
}
|
|
141
145
|
return flattenRules(branch, ctx);
|
|
@@ -14,7 +14,7 @@ _export(exports, {
|
|
|
14
14
|
unknownDefinitionMessage: ()=>unknownDefinitionMessage,
|
|
15
15
|
writeBadDefinitionTypeMessage: ()=>writeBadDefinitionTypeMessage
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const _typeTs = require("../scopes/type.js");
|
|
18
18
|
const _domainsTs = require("../utils/domains.js");
|
|
19
19
|
const _errorsTs = require("../utils/errors.js");
|
|
20
20
|
const _objectKindsTs = require("../utils/objectKinds.js");
|
|
@@ -43,7 +43,7 @@ const parseDefinition = (def, ctx)=>{
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
case "Function":
|
|
46
|
-
return (0,
|
|
46
|
+
return (0, _typeTs.isType)(def) ? def.node : (0, _errorsTs.throwParseError)(writeBadDefinitionTypeMessage("Function"));
|
|
47
47
|
default:
|
|
48
48
|
return (0, _errorsTs.throwParseError)(writeBadDefinitionTypeMessage(objectKind ?? (0, _serializeTs.stringify)(def)));
|
|
49
49
|
}
|
|
@@ -12,6 +12,7 @@ _export(exports, {
|
|
|
12
12
|
parseMorphTuple: ()=>parseMorphTuple,
|
|
13
13
|
writeMalformedMorphExpressionMessage: ()=>writeMalformedMorphExpressionMessage
|
|
14
14
|
});
|
|
15
|
+
const _predicateTs = require("../../nodes/predicate.js");
|
|
15
16
|
const _errorsTs = require("../../utils/errors.js");
|
|
16
17
|
const _objectKindsTs = require("../../utils/objectKinds.js");
|
|
17
18
|
const _serializeTs = require("../../utils/serialize.js");
|
|
@@ -29,7 +30,7 @@ const parseMorphTuple = (def, ctx)=>{
|
|
|
29
30
|
const predicate = resolution[domain];
|
|
30
31
|
if (predicate === true) {
|
|
31
32
|
result[domain] = {
|
|
32
|
-
|
|
33
|
+
rules: {},
|
|
33
34
|
morph
|
|
34
35
|
};
|
|
35
36
|
} else if (typeof predicate === "object") {
|
|
@@ -40,17 +41,17 @@ const parseMorphTuple = (def, ctx)=>{
|
|
|
40
41
|
}
|
|
41
42
|
return result;
|
|
42
43
|
};
|
|
43
|
-
const applyMorph = (branch, morph)=>branch
|
|
44
|
-
|
|
45
|
-
morph: Array.isArray(branch.morph) ? [
|
|
44
|
+
const applyMorph = (branch, morph)=>(0, _predicateTs.branchIsTransformation)(branch) ? {
|
|
45
|
+
...branch,
|
|
46
|
+
morph: branch.morph ? Array.isArray(branch.morph) ? [
|
|
46
47
|
...branch.morph,
|
|
47
48
|
morph
|
|
48
49
|
] : [
|
|
49
50
|
branch.morph,
|
|
50
51
|
morph
|
|
51
|
-
]
|
|
52
|
+
] : morph
|
|
52
53
|
} : {
|
|
53
|
-
|
|
54
|
+
rules: branch,
|
|
54
55
|
morph
|
|
55
56
|
};
|
|
56
57
|
const writeMalformedMorphExpressionMessage = (value)=>`Morph expression requires a function following '=>' (was ${typeof value})`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Cache: ()=>Cache,
|
|
13
|
+
FreezingCache: ()=>FreezingCache
|
|
14
|
+
});
|
|
15
|
+
const _freezeTs = require("../utils/freeze.js");
|
|
16
|
+
class Cache {
|
|
17
|
+
get root() {
|
|
18
|
+
return this.cache;
|
|
19
|
+
}
|
|
20
|
+
has(name) {
|
|
21
|
+
return name in this.cache;
|
|
22
|
+
}
|
|
23
|
+
get(name) {
|
|
24
|
+
return this.cache[name];
|
|
25
|
+
}
|
|
26
|
+
set(name, item) {
|
|
27
|
+
this.cache[name] = item;
|
|
28
|
+
return item;
|
|
29
|
+
}
|
|
30
|
+
constructor(){
|
|
31
|
+
this.cache = {};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class FreezingCache extends Cache {
|
|
35
|
+
set(name, item) {
|
|
36
|
+
this.cache[name] = (0, _freezeTs.deepFreeze)(item);
|
|
37
|
+
return item;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
jsObjectsScope: ()=>jsObjectsScope,
|
|
13
|
+
jsObjects: ()=>jsObjects
|
|
14
|
+
});
|
|
15
|
+
const _scopeTs = require("./scope.js");
|
|
16
|
+
const jsObjectsScope = (0, _scopeTs.scope)({
|
|
17
|
+
Function: [
|
|
18
|
+
"node",
|
|
19
|
+
{
|
|
20
|
+
object: {
|
|
21
|
+
objectKind: "Function"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
Array: [
|
|
26
|
+
"node",
|
|
27
|
+
{
|
|
28
|
+
object: {
|
|
29
|
+
objectKind: "Array"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
Date: [
|
|
34
|
+
"node",
|
|
35
|
+
{
|
|
36
|
+
object: {
|
|
37
|
+
objectKind: "Date"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
Error: [
|
|
42
|
+
"node",
|
|
43
|
+
{
|
|
44
|
+
object: {
|
|
45
|
+
objectKind: "Error"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
Map: [
|
|
50
|
+
"node",
|
|
51
|
+
{
|
|
52
|
+
object: {
|
|
53
|
+
objectKind: "Map"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
RegExp: [
|
|
58
|
+
"node",
|
|
59
|
+
{
|
|
60
|
+
object: {
|
|
61
|
+
objectKind: "RegExp"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
Set: [
|
|
66
|
+
"node",
|
|
67
|
+
{
|
|
68
|
+
object: {
|
|
69
|
+
objectKind: "Set"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
Object: [
|
|
74
|
+
"node",
|
|
75
|
+
{
|
|
76
|
+
object: {
|
|
77
|
+
objectKind: "Object"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
String: [
|
|
82
|
+
"node",
|
|
83
|
+
{
|
|
84
|
+
object: {
|
|
85
|
+
objectKind: "String"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
Number: [
|
|
90
|
+
"node",
|
|
91
|
+
{
|
|
92
|
+
object: {
|
|
93
|
+
objectKind: "Number"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
Boolean: [
|
|
98
|
+
"node",
|
|
99
|
+
{
|
|
100
|
+
object: {
|
|
101
|
+
objectKind: "Boolean"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
WeakMap: [
|
|
106
|
+
"node",
|
|
107
|
+
{
|
|
108
|
+
object: {
|
|
109
|
+
objectKind: "WeakMap"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
WeakSet: [
|
|
114
|
+
"node",
|
|
115
|
+
{
|
|
116
|
+
object: {
|
|
117
|
+
objectKind: "WeakSet"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
Promise: [
|
|
122
|
+
"node",
|
|
123
|
+
{
|
|
124
|
+
object: {
|
|
125
|
+
objectKind: "Promise"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}, {
|
|
130
|
+
name: "jsObjects",
|
|
131
|
+
standard: false
|
|
132
|
+
});
|
|
133
|
+
const jsObjects = jsObjectsScope.compile();
|