@es-joy/jsoe 0.3.0 → 0.4.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/.eslintignore +3 -0
- package/.eslintrc.cjs +1 -0
- package/.ncurc.cjs +9 -0
- package/CHANGES.md +4 -0
- package/demo/index.html +8 -0
- package/demo/index.js +1 -1
- package/dist/formatAndTypeChoices.d.ts +56 -0
- package/dist/formatAndTypeChoices.d.ts.map +1 -0
- package/dist/formats/indexedDBKey.d.ts +4 -0
- package/dist/formats/indexedDBKey.d.ts.map +1 -0
- package/dist/formats/json.d.ts +4 -0
- package/dist/formats/json.d.ts.map +1 -0
- package/dist/formats/schemaAndArbitrary.d.ts +6 -0
- package/dist/formats/schemaAndArbitrary.d.ts.map +1 -0
- package/dist/formats/schemaOnly.d.ts +6 -0
- package/dist/formats/schemaOnly.d.ts.map +1 -0
- package/dist/formats/structuredCloning.d.ts +20 -0
- package/dist/formats/structuredCloning.d.ts.map +1 -0
- package/dist/formats.d.ts +26 -0
- package/dist/formats.d.ts.map +1 -0
- package/dist/fundamentalTypes/BooleanObjectType.d.ts +8 -0
- package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -0
- package/dist/fundamentalTypes/NumberObjectType.d.ts +6 -0
- package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -0
- package/dist/fundamentalTypes/StringObjectType.d.ts +6 -0
- package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -0
- package/dist/fundamentalTypes/arrayReferenceType.d.ts +8 -0
- package/dist/fundamentalTypes/arrayReferenceType.d.ts.map +1 -0
- package/dist/fundamentalTypes/arrayType.d.ts +60 -0
- package/dist/fundamentalTypes/arrayType.d.ts.map +1 -0
- package/dist/fundamentalTypes/bigintType.d.ts +6 -0
- package/dist/fundamentalTypes/bigintType.d.ts.map +1 -0
- package/dist/fundamentalTypes/dateType.d.ts +26 -0
- package/dist/fundamentalTypes/dateType.d.ts.map +1 -0
- package/dist/fundamentalTypes/nullType.d.ts +6 -0
- package/dist/fundamentalTypes/nullType.d.ts.map +1 -0
- package/dist/fundamentalTypes/numberType.d.ts +6 -0
- package/dist/fundamentalTypes/numberType.d.ts.map +1 -0
- package/dist/fundamentalTypes/objectReferenceType.d.ts +8 -0
- package/dist/fundamentalTypes/objectReferenceType.d.ts.map +1 -0
- package/dist/fundamentalTypes/objectType.d.ts +6 -0
- package/dist/fundamentalTypes/objectType.d.ts.map +1 -0
- package/dist/fundamentalTypes/regexpType.d.ts +8 -0
- package/dist/fundamentalTypes/regexpType.d.ts.map +1 -0
- package/dist/fundamentalTypes/sparseUndefinedType.d.ts +6 -0
- package/dist/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -0
- package/dist/fundamentalTypes/stringType.d.ts +6 -0
- package/dist/fundamentalTypes/stringType.d.ts.map +1 -0
- package/dist/fundamentalTypes/undefinedType.d.ts +6 -0
- package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/src/deepEqual.d.ts +3 -0
- package/dist/src/deepEqual.d.ts.map +1 -0
- package/dist/src/formatAndTypeChoices.d.ts +47 -0
- package/dist/src/formatAndTypeChoices.d.ts.map +1 -0
- package/dist/src/formats/indexedDBKey.d.ts +9 -0
- package/dist/src/formats/indexedDBKey.d.ts.map +1 -0
- package/dist/src/formats/json.d.ts +9 -0
- package/dist/src/formats/json.d.ts.map +1 -0
- package/dist/src/formats/schemaAndArbitrary.d.ts +6 -0
- package/dist/src/formats/schemaAndArbitrary.d.ts.map +1 -0
- package/dist/src/formats/schemaOnly.d.ts +6 -0
- package/dist/src/formats/schemaOnly.d.ts.map +1 -0
- package/dist/src/formats/structuredCloning.d.ts +15 -0
- package/dist/src/formats/structuredCloning.d.ts.map +1 -0
- package/dist/src/formats.d.ts +18 -0
- package/dist/src/formats.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts +6 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts +6 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts +6 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/dateType.d.ts +6 -0
- package/dist/src/fundamentalTypes/dateType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/nullType.d.ts +6 -0
- package/dist/src/fundamentalTypes/nullType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/numberType.d.ts +6 -0
- package/dist/src/fundamentalTypes/numberType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts +6 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/objectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts +6 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/stringType.d.ts +6 -0
- package/dist/src/fundamentalTypes/stringType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/subTypes/blobHTMLType.d.ts +26 -0
- package/dist/src/subTypes/blobHTMLType.d.ts.map +1 -0
- package/dist/src/subTypes/falseType.d.ts +6 -0
- package/dist/src/subTypes/falseType.d.ts.map +1 -0
- package/dist/src/subTypes/trueType.d.ts +6 -0
- package/dist/src/subTypes/trueType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialNumberSuperType.d.ts +11 -0
- package/dist/src/superTypes/SpecialNumberSuperType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialRealNumberSuperType.d.ts +6 -0
- package/dist/src/superTypes/SpecialRealNumberSuperType.d.ts.map +1 -0
- package/dist/src/typeChoices.d.ts +30 -0
- package/dist/src/typeChoices.d.ts.map +1 -0
- package/dist/src/types.d.ts +333 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/dialogs.d.ts +29 -0
- package/dist/src/utils/dialogs.d.ts.map +1 -0
- package/dist/src/utils/jsonPointer.d.ts +42 -0
- package/dist/src/utils/jsonPointer.d.ts.map +1 -0
- package/dist/src/utils/templateUtils.d.ts +59 -0
- package/dist/src/utils/templateUtils.d.ts.map +1 -0
- package/dist/src/utils/types.d.ts +2 -0
- package/dist/src/utils/types.d.ts.map +1 -0
- package/dist/subTypes/blobHTMLType.d.ts +14 -0
- package/dist/subTypes/blobHTMLType.d.ts.map +1 -0
- package/dist/subTypes/falseType.d.ts +8 -0
- package/dist/subTypes/falseType.d.ts.map +1 -0
- package/dist/subTypes/trueType.d.ts +8 -0
- package/dist/subTypes/trueType.d.ts.map +1 -0
- package/dist/superTypes/SpecialNumberSuperType.d.ts +14 -0
- package/dist/superTypes/SpecialNumberSuperType.d.ts.map +1 -0
- package/dist/superTypes/SpecialRealNumberSuperType.d.ts +6 -0
- package/dist/superTypes/SpecialRealNumberSuperType.d.ts.map +1 -0
- package/dist/typeChoices.d.ts +103 -0
- package/dist/typeChoices.d.ts.map +1 -0
- package/dist/types.d.ts +523 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/dialogs.d.ts +109 -0
- package/dist/utils/dialogs.d.ts.map +1 -0
- package/dist/utils/jsonPointer.d.ts +46 -0
- package/dist/utils/jsonPointer.d.ts.map +1 -0
- package/dist/utils/templateUtils.d.ts +59 -0
- package/dist/utils/templateUtils.d.ts.map +1 -0
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/vendor/jamilih/dist/jml-es.d.ts +436 -0
- package/dist/vendor/jamilih/dist/jml-es.d.ts.map +1 -0
- package/dist/vendor/typeson-registry/dist/index.d.ts +400 -0
- package/dist/vendor/typeson-registry/dist/index.d.ts.map +1 -0
- package/dist/vendor-imports.d.ts +3 -0
- package/dist/vendor-imports.d.ts.map +1 -0
- package/package.json +16 -11
- package/postorder-traversal.js +58 -0
- package/src/formatAndTypeChoices.js +95 -50
- package/src/formats/indexedDBKey.js +49 -57
- package/src/formats/json.js +47 -56
- package/src/formats/schemaOnly.js +12 -2
- package/src/formats/structuredCloning.js +162 -105
- package/src/formats.js +38 -10
- package/src/fundamentalTypes/BooleanObjectType.js +6 -4
- package/src/fundamentalTypes/NumberObjectType.js +5 -3
- package/src/fundamentalTypes/StringObjectType.js +1 -1
- package/src/fundamentalTypes/arrayReferenceType.js +29 -14
- package/src/fundamentalTypes/arrayType.js +789 -278
- package/src/fundamentalTypes/bigintType.js +2 -2
- package/src/fundamentalTypes/dateType.js +42 -14
- package/src/fundamentalTypes/nullType.js +1 -1
- package/src/fundamentalTypes/numberType.js +2 -2
- package/src/fundamentalTypes/objectReferenceType.js +7 -5
- package/src/fundamentalTypes/regexpType.js +45 -24
- package/src/fundamentalTypes/sparseUndefinedType.js +7 -1
- package/src/fundamentalTypes/stringType.js +1 -1
- package/src/fundamentalTypes/undefinedType.js +2 -2
- package/src/subTypes/blobHTMLType.js +42 -22
- package/src/subTypes/falseType.js +2 -2
- package/src/subTypes/trueType.js +2 -2
- package/src/superTypes/SpecialNumberSuperType.js +13 -6
- package/src/superTypes/SpecialRealNumberSuperType.js +11 -5
- package/src/typeChoices.js +137 -55
- package/src/types.js +309 -146
- package/src/utils/dialogs.js +98 -29
- package/src/utils/jsonPointer.js +4 -0
- package/src/utils/templateUtils.js +27 -12
- package/src/vendor-imports.js +8 -0
- package/tsconfig.json +18 -0
- package/typings/sceditor.d.ts +20 -0
- package/vendor/jamilih/dist/jml-es.js +1019 -389
- package/vendor/jamilih/dist/jml.d.ts +436 -0
- package/vendor/jamilih/package.json +136 -0
- package/vendor/typeson-registry/dist/index.js +365 -83
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
declare var l: string[];
|
|
2
|
+
declare var u: Typeson;
|
|
3
|
+
declare class e {
|
|
4
|
+
private constructor();
|
|
5
|
+
then(t: any, r: any): any;
|
|
6
|
+
catch(e: any): any;
|
|
7
|
+
}
|
|
8
|
+
declare var p: any;
|
|
9
|
+
export const arrayNonindexKeys: ({
|
|
10
|
+
arrayNonindexKeys: {
|
|
11
|
+
testPlainObjects: boolean;
|
|
12
|
+
test(x: any, stateObj: any): boolean;
|
|
13
|
+
replace(a: any, stateObj: any): any;
|
|
14
|
+
revive(o: any): any[];
|
|
15
|
+
};
|
|
16
|
+
sparseUndefined?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
sparseUndefined: {
|
|
19
|
+
test(x: any, stateObj: any): boolean;
|
|
20
|
+
replace(n: any): number;
|
|
21
|
+
revive(s: any): undefined;
|
|
22
|
+
};
|
|
23
|
+
arrayNonindexKeys?: undefined;
|
|
24
|
+
})[];
|
|
25
|
+
export namespace arraybuffer {
|
|
26
|
+
namespace arraybuffer {
|
|
27
|
+
function test(x: any): boolean;
|
|
28
|
+
function replace(b: any, stateObj: any): string | {
|
|
29
|
+
index: any;
|
|
30
|
+
};
|
|
31
|
+
function revive(b64: any, stateObj: any): any;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export namespace bigint {
|
|
35
|
+
namespace bigint {
|
|
36
|
+
function test(x: any): boolean;
|
|
37
|
+
const replace: StringConstructor;
|
|
38
|
+
const revive: BigIntConstructor;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export namespace bigintObject {
|
|
42
|
+
namespace bigintObject {
|
|
43
|
+
export function test(x: any): boolean;
|
|
44
|
+
const replace_1: StringConstructor;
|
|
45
|
+
export { replace_1 as replace };
|
|
46
|
+
export function revive(s: any): Object;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export namespace blob {
|
|
50
|
+
namespace blob {
|
|
51
|
+
function test(x: any): boolean;
|
|
52
|
+
function replace(b: any): {
|
|
53
|
+
type: any;
|
|
54
|
+
stringContents: string;
|
|
55
|
+
};
|
|
56
|
+
function revive({ type, stringContents }: {
|
|
57
|
+
type: any;
|
|
58
|
+
stringContents: any;
|
|
59
|
+
}): Blob;
|
|
60
|
+
function replaceAsync(b: any): any;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
declare const expObj$1: {}[];
|
|
64
|
+
export namespace cloneable {
|
|
65
|
+
namespace cloneable {
|
|
66
|
+
function test(x: any): any;
|
|
67
|
+
function replace(clonable: any): {
|
|
68
|
+
uuid: string;
|
|
69
|
+
encapsulated: any;
|
|
70
|
+
};
|
|
71
|
+
function revive({ uuid, encapsulated }: {
|
|
72
|
+
uuid: any;
|
|
73
|
+
encapsulated: any;
|
|
74
|
+
}): any;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export namespace cryptokey {
|
|
78
|
+
namespace cryptokey {
|
|
79
|
+
function test(x: any): any;
|
|
80
|
+
function replaceAsync(key: any): any;
|
|
81
|
+
function revive({ jwk, algorithm, usages }: {
|
|
82
|
+
jwk: any;
|
|
83
|
+
algorithm: any;
|
|
84
|
+
usages: any;
|
|
85
|
+
}): Promise<CryptoKey>;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export namespace dataview {
|
|
89
|
+
namespace dataview {
|
|
90
|
+
function test(x: any): boolean;
|
|
91
|
+
function replace({ buffer, byteOffset, byteLength }: {
|
|
92
|
+
buffer: any;
|
|
93
|
+
byteOffset: any;
|
|
94
|
+
byteLength: any;
|
|
95
|
+
}, stateObj: any): {
|
|
96
|
+
index: any;
|
|
97
|
+
byteOffset: any;
|
|
98
|
+
byteLength: any;
|
|
99
|
+
encoded?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
encoded: string;
|
|
102
|
+
byteOffset: any;
|
|
103
|
+
byteLength: any;
|
|
104
|
+
index?: undefined;
|
|
105
|
+
};
|
|
106
|
+
function revive(b64Obj: any, stateObj: any): DataView;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export namespace date {
|
|
110
|
+
namespace date {
|
|
111
|
+
function test(x: any): boolean;
|
|
112
|
+
function replace(dt: any): any;
|
|
113
|
+
function revive(time: any): Date;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export namespace error {
|
|
117
|
+
namespace error {
|
|
118
|
+
function test(x: any): boolean;
|
|
119
|
+
function replace({ name, message, cause, stack, fileName, lineNumber, columnNumber }: {
|
|
120
|
+
name: any;
|
|
121
|
+
message: any;
|
|
122
|
+
cause: any;
|
|
123
|
+
stack: any;
|
|
124
|
+
fileName: any;
|
|
125
|
+
lineNumber: any;
|
|
126
|
+
columnNumber: any;
|
|
127
|
+
}): {
|
|
128
|
+
name: any;
|
|
129
|
+
message: any;
|
|
130
|
+
cause: any;
|
|
131
|
+
stack: any;
|
|
132
|
+
fileName: any;
|
|
133
|
+
lineNumber: any;
|
|
134
|
+
columnNumber: any;
|
|
135
|
+
};
|
|
136
|
+
function revive(obj: any): Error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export const errors: {};
|
|
140
|
+
export function escapeKeyPathComponent(e: any): any;
|
|
141
|
+
export namespace file {
|
|
142
|
+
namespace file {
|
|
143
|
+
function test(x: any): boolean;
|
|
144
|
+
function replace(f: any): {
|
|
145
|
+
type: any;
|
|
146
|
+
stringContents: string;
|
|
147
|
+
name: any;
|
|
148
|
+
lastModified: any;
|
|
149
|
+
};
|
|
150
|
+
function revive({ name, type, stringContents, lastModified }: {
|
|
151
|
+
name: any;
|
|
152
|
+
type: any;
|
|
153
|
+
stringContents: any;
|
|
154
|
+
lastModified: any;
|
|
155
|
+
}): File;
|
|
156
|
+
function replaceAsync(f: any): any;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export namespace filelist {
|
|
160
|
+
import file_1 = file.file;
|
|
161
|
+
export { file_1 as file };
|
|
162
|
+
export namespace filelist {
|
|
163
|
+
function test(x: any): boolean;
|
|
164
|
+
function replace(fl: any): any[];
|
|
165
|
+
function revive(o: any): {
|
|
166
|
+
_files: any;
|
|
167
|
+
length: any;
|
|
168
|
+
/**
|
|
169
|
+
* @param {Integer} index
|
|
170
|
+
* @returns {File}
|
|
171
|
+
*/
|
|
172
|
+
item(index: Integer): File;
|
|
173
|
+
/**
|
|
174
|
+
* @returns {"FileList"}
|
|
175
|
+
*/
|
|
176
|
+
readonly [Symbol.toStringTag]: "FileList";
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
export function getByKeyPath(e: any, t: any): any;
|
|
181
|
+
export function getJSONType(e: any): any;
|
|
182
|
+
export function hasConstructorOf(e: any, t: any): boolean;
|
|
183
|
+
export namespace imagebitmap {
|
|
184
|
+
namespace imagebitmap {
|
|
185
|
+
function test(x: any): any;
|
|
186
|
+
function replace(bm: any): string;
|
|
187
|
+
function revive(o: any): HTMLCanvasElement;
|
|
188
|
+
function reviveAsync(o: any): Promise<ImageBitmap>;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
export namespace imagedata {
|
|
192
|
+
namespace imagedata {
|
|
193
|
+
function test(x: any): boolean;
|
|
194
|
+
function replace(d: any): {
|
|
195
|
+
array: any[];
|
|
196
|
+
width: any;
|
|
197
|
+
height: any;
|
|
198
|
+
};
|
|
199
|
+
function revive(o: any): ImageData;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
export namespace infinity {
|
|
203
|
+
namespace infinity {
|
|
204
|
+
function test(x: any): boolean;
|
|
205
|
+
function replace(n: any): string;
|
|
206
|
+
function revive(s: any): number;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export namespace intlTypes {
|
|
210
|
+
export { IntlCollator };
|
|
211
|
+
export { IntlDateTimeFormat };
|
|
212
|
+
export { IntlNumberFormat };
|
|
213
|
+
}
|
|
214
|
+
export function isObject(e: any): any;
|
|
215
|
+
export function isPlainObject(e: any): boolean;
|
|
216
|
+
export function isThenable(e: any, t: any): any;
|
|
217
|
+
export function isUserObject(e: any): any;
|
|
218
|
+
export namespace map {
|
|
219
|
+
namespace map {
|
|
220
|
+
function test(x: any): boolean;
|
|
221
|
+
function replace(mp: any): any[];
|
|
222
|
+
function revive(entries: any): Map<any, any>;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export namespace nan {
|
|
226
|
+
namespace nan {
|
|
227
|
+
function test(x: any): boolean;
|
|
228
|
+
function replace(n: any): string;
|
|
229
|
+
function revive(s: any): number;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
export namespace negativeInfinity {
|
|
233
|
+
namespace negativeInfinity {
|
|
234
|
+
function test(x: any): boolean;
|
|
235
|
+
function replace(n: any): string;
|
|
236
|
+
function revive(s: any): number;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
export namespace negativeZero {
|
|
240
|
+
namespace negativeZero {
|
|
241
|
+
function test(x: any): boolean;
|
|
242
|
+
function replace(n: any): number;
|
|
243
|
+
function revive(s: any): number;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
export namespace nonbuiltinIgnore {
|
|
247
|
+
namespace nonbuiltinIgnore {
|
|
248
|
+
function test(x: any): any;
|
|
249
|
+
function replace(rexp: any): void;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export const postmessage: {}[];
|
|
253
|
+
export namespace primitiveObjects {
|
|
254
|
+
namespace StringObject {
|
|
255
|
+
export function test(x: any): boolean;
|
|
256
|
+
const replace_2: StringConstructor;
|
|
257
|
+
export { replace_2 as replace };
|
|
258
|
+
export function revive(s: any): String;
|
|
259
|
+
}
|
|
260
|
+
namespace BooleanObject {
|
|
261
|
+
export function test(x: any): boolean;
|
|
262
|
+
const replace_3: BooleanConstructor;
|
|
263
|
+
export { replace_3 as replace };
|
|
264
|
+
export function revive(b: any): Boolean;
|
|
265
|
+
}
|
|
266
|
+
namespace NumberObject {
|
|
267
|
+
export function test(x: any): boolean;
|
|
268
|
+
const replace_4: NumberConstructor;
|
|
269
|
+
export { replace_4 as replace };
|
|
270
|
+
export function revive(n: any): Number;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
export namespace regexp {
|
|
274
|
+
namespace regexp {
|
|
275
|
+
function test(x: any): boolean;
|
|
276
|
+
function replace(rexp: any): {
|
|
277
|
+
source: any;
|
|
278
|
+
flags: string;
|
|
279
|
+
};
|
|
280
|
+
function revive({ source, flags }: {
|
|
281
|
+
source: any;
|
|
282
|
+
flags: any;
|
|
283
|
+
}): RegExp;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
export namespace resurrectable {
|
|
287
|
+
namespace resurrectable {
|
|
288
|
+
function test(x: any): any;
|
|
289
|
+
function replace(rsrrctble: any): string;
|
|
290
|
+
function revive(serializedResurrectable: any): any;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
export namespace set {
|
|
294
|
+
namespace set {
|
|
295
|
+
function test(x: any): boolean;
|
|
296
|
+
function replace(st: any): any[];
|
|
297
|
+
function revive(values: any): Set<any>;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
export function setAtKeyPath(e: any, t: any, r: any): any;
|
|
301
|
+
export const socketio: {}[];
|
|
302
|
+
export const sparseUndefined: ({
|
|
303
|
+
sparseArrays: {
|
|
304
|
+
testPlainObjects: boolean;
|
|
305
|
+
test(x: any): boolean;
|
|
306
|
+
replace(a: any, stateObj: any): any;
|
|
307
|
+
};
|
|
308
|
+
sparseUndefined?: undefined;
|
|
309
|
+
} | {
|
|
310
|
+
sparseUndefined: {
|
|
311
|
+
test(x: any, stateObj: any): boolean;
|
|
312
|
+
replace(n: any): number;
|
|
313
|
+
revive(s: any): undefined;
|
|
314
|
+
};
|
|
315
|
+
sparseArrays?: undefined;
|
|
316
|
+
})[];
|
|
317
|
+
export const specialNumbers: ({
|
|
318
|
+
infinity: {
|
|
319
|
+
test(x: any): boolean;
|
|
320
|
+
replace(n: any): string;
|
|
321
|
+
revive(s: any): number;
|
|
322
|
+
};
|
|
323
|
+
} | {
|
|
324
|
+
nan: {
|
|
325
|
+
test(x: any): boolean;
|
|
326
|
+
replace(n: any): string;
|
|
327
|
+
revive(s: any): number;
|
|
328
|
+
};
|
|
329
|
+
} | {
|
|
330
|
+
negativeInfinity: {
|
|
331
|
+
test(x: any): boolean;
|
|
332
|
+
replace(n: any): string;
|
|
333
|
+
revive(s: any): number;
|
|
334
|
+
};
|
|
335
|
+
} | {
|
|
336
|
+
negativeZero: {
|
|
337
|
+
test(x: any): boolean;
|
|
338
|
+
replace(n: any): number;
|
|
339
|
+
revive(s: any): number;
|
|
340
|
+
};
|
|
341
|
+
})[];
|
|
342
|
+
declare const expObj: {}[];
|
|
343
|
+
export var structuredCloningThrowing: {}[];
|
|
344
|
+
export function toStringTag(e: any): string;
|
|
345
|
+
export const typedArrays: {};
|
|
346
|
+
declare const typedArraysSocketIO: {};
|
|
347
|
+
declare namespace undef$1 {
|
|
348
|
+
namespace undef {
|
|
349
|
+
function test(x: any, stateObj: any): any;
|
|
350
|
+
function replace(n: any): number;
|
|
351
|
+
function revive(s: any): any;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
declare const undef: ({
|
|
355
|
+
undef: {
|
|
356
|
+
test(x: any, stateObj: any): any;
|
|
357
|
+
replace(n: any): number;
|
|
358
|
+
revive(s: any): any;
|
|
359
|
+
};
|
|
360
|
+
} | ({
|
|
361
|
+
sparseArrays: {
|
|
362
|
+
testPlainObjects: boolean;
|
|
363
|
+
test(x: any): boolean;
|
|
364
|
+
replace(a: any, stateObj: any): any;
|
|
365
|
+
};
|
|
366
|
+
sparseUndefined?: undefined;
|
|
367
|
+
} | {
|
|
368
|
+
sparseUndefined: {
|
|
369
|
+
test(x: any, stateObj: any): boolean;
|
|
370
|
+
replace(n: any): number;
|
|
371
|
+
revive(s: any): undefined;
|
|
372
|
+
};
|
|
373
|
+
sparseArrays?: undefined;
|
|
374
|
+
})[])[];
|
|
375
|
+
export function unescapeKeyPathComponent(e: any): any;
|
|
376
|
+
export const universal: {}[][];
|
|
377
|
+
export namespace userObject {
|
|
378
|
+
namespace userObject {
|
|
379
|
+
function test(x: any, stateObj: any): any;
|
|
380
|
+
function replace(n: any): any;
|
|
381
|
+
function revive(s: any): any;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
declare namespace IntlCollator {
|
|
385
|
+
function test(x: any): boolean;
|
|
386
|
+
function replace(c: any): any;
|
|
387
|
+
function revive(options: any): Intl.Collator;
|
|
388
|
+
}
|
|
389
|
+
declare namespace IntlDateTimeFormat {
|
|
390
|
+
function test(x: any): boolean;
|
|
391
|
+
function replace(dtf: any): any;
|
|
392
|
+
function revive(options: any): Intl.DateTimeFormat;
|
|
393
|
+
}
|
|
394
|
+
declare namespace IntlNumberFormat {
|
|
395
|
+
function test(x: any): boolean;
|
|
396
|
+
function replace(nf: any): any;
|
|
397
|
+
function revive(options: any): Intl.NumberFormat;
|
|
398
|
+
}
|
|
399
|
+
export { l as JSON_TYPES, u as Typeson, e as TypesonPromise, p as Undefined, expObj$1 as builtin, expObj as structuredCloning, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset };
|
|
400
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../vendor/typeson-registry/dist/index.js"],"names":[],"mappings":"AAG4+U,wBAA4D;AAApiV,uBAAu3U;;;IAHvsN,0BAAgL;IAAC,mBAAuD;;AAGg+M,mBAAwE;AA49Bp8U;;;;;;;;;;;;;;;KA4DE;;;QAl8BM,+BAAqD;QACrD;;UAUC;QACD,8CAUC;;;;;QA0BD,+BAEC;;;;;;;QAlBD,sCAEC;;;QAED,uCAIC;;;;;QAuFD,+BAA8C;QAC9C;;;UAeC;QACD;;;iBAEC;QACD,mCAsBC;;;AAkzBT,6BAsBE;;;QAlyBM,2BAGC;QACD;;;UAKC;QACD;;;gBAIC;;;;;QAQD,2BAEC;QACD,qCAiBC;QACD;;;;+BAEC;;;;;QAMD,+BAAkD;QAClD;;;;;;;;;;;;;;UAcC;QACD,sDAaC;;;;;QAMD,+BAA8C;QAC9C,+BAMC;QACD,iCAKC;;;;;QAMD,+BAA+C;QAC/C;;;;;;;;;;;;;;;;UAMC;QACD,iCASC;;;AAMT,wBAAkB;AAxa2jK,oDAA4H;;;QAqejsK,+BAA8C;QAC9C;;;;;UAiBC;QACD;;;;;iBAKC;QACD,mCAwBC;;;;;;;QAOD,+BAAkD;QAClD,iCAMC;QACD;;;YAaQ;;;eAGG;;YAKH;;eAEG;;UAOV;;;AAnkB6zK,kDAAwN;AAA6L,yCAAmF;AAA90C,0DAAyU;;;QA2kBjyJ,2BAKC;QACD,kCAWC;QACD,2CAqBC;QACD,mDAUC;;;;;QAQD,+BAAmD;QACnD;;;;UAOC;QACD,mCAIC;;;;;QAMD,+BAAmD;QACnD,iCAAkC;QAClC,gCAA+C;;;;;;;;AA1pBi+J,sCAAqD;AAApS,+CAAuG;AAA9kB,gDAAyG;AAAqe,0CAAwI;;;QA0rBhhK,+BAA6C;QAC7C,iCAA0C;QAC1C,6CAA6C;;;;;QAM7C,+BAAoC;QACpC,iCAA6B;QAC7B,gCAAiC;;;;;QAMjC,+BAAmD;QACnD,iCAAmC;QACnC,gCAA+C;;;;;QAM/C,+BAEC;QACD,iCAGC;QACD,gCAEC;;;;;QAMD,2BAoBC;QACD,kCAEC;;;AAoWT,+BAGE;;;QA9VM,sCAEC;;;QAED,uCAAoC;;;QAIpC,sCAGC;;;QAED,wCAGC;;;QAID,sCAEC;;;QAED,uCAAoC;;;;;QAMpC,+BAAgD;QAChD;;;UASC;QACD;;;mBAA8D;;;;;QAU9D,2BAIC;QACD,yCAIC;QACD,mDAEC;;;;;QAMD,+BAA6C;QAC7C,iCAEC;QACD,uCAA2C;;;AA10B2+K,0DAA6L;AAimC3tL,4BAME;AAEF;;;;;;;;;;;;;;KAoBE;AAhGF;;;;;;;;;;;;;;;;;;;;;;;;KAKE;AA+FF,2BAoCE;AAIF,2CAyEG;AAlvCw6I,4CAAqD;AAy4Bh+I,6BAAuB;AAxDvB,sCAA+B;;;QAyHvB,0CAGC;QACD,iCAAyB;QACzB,6BAIC;;;AAiST;;;;;;;;;;;;;;;;;;;;QAGE;AAvvCusK,sDAA6H;AAyvCt0K,+BAIE;;;QApSM,0CAA8C;QAC9C,8BAA8B;QAC9B,6BAAwB;;;;IA5T5B,+BAAuD;IACvD,8BAA2C;IAC3C,6CAAuE;;;IAIvE,+BAA6D;IAC7D,gCAA+C;IAC/C,mDAEC;;;IAID,+BAA2D;IAC3D,+BAA6C;IAC7C,iDAA2E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor-imports.d.ts","sourceRoot":"","sources":["../src/vendor-imports.js"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@es-joy/jsoe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
5
6
|
"exports": {
|
|
6
7
|
".": "./src/index.js"
|
|
7
8
|
},
|
|
@@ -16,33 +17,34 @@
|
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"@brettz9/node-static": "^0.1.1",
|
|
19
|
-
"jamilih": "0.
|
|
20
|
+
"jamilih": "0.56.0",
|
|
20
21
|
"sceditor": "3.2.0",
|
|
21
|
-
"typeson-registry": "
|
|
22
|
+
"typeson-registry": "7.0.1"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@babel/core": "^7.21.
|
|
25
|
-
"@babel/plugin-transform-modules-commonjs": "^7.21.
|
|
26
|
-
"@babel/preset-env": "^7.21.
|
|
25
|
+
"@babel/core": "^7.21.8",
|
|
26
|
+
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
|
|
27
|
+
"@babel/preset-env": "^7.21.5",
|
|
27
28
|
"@babel/register": "^7.21.0",
|
|
28
29
|
"@brettz9/eslint-plugin": "^1.0.4",
|
|
29
30
|
"@cypress/code-coverage": "^3.10.4",
|
|
30
31
|
"@rollup/plugin-babel": "^6.0.3",
|
|
31
32
|
"@rollup/plugin-commonjs": "^24.1.0",
|
|
32
33
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
34
|
+
"@types/jsdom": "^21.1.1",
|
|
33
35
|
"axe-core": "^4.7.0",
|
|
34
|
-
"cypress": "^12.
|
|
36
|
+
"cypress": "^12.11.0",
|
|
35
37
|
"cypress-axe": "^1.4.0",
|
|
36
38
|
"eslint": "^8.39.0",
|
|
37
39
|
"eslint-config-ash-nazg": "^34.11.1",
|
|
38
40
|
"eslint-config-standard": "^17.0.0",
|
|
39
41
|
"eslint-plugin-array-func": "^3.1.8",
|
|
40
42
|
"eslint-plugin-compat": "^4.1.4",
|
|
41
|
-
"eslint-plugin-cypress": "^2.13.
|
|
43
|
+
"eslint-plugin-cypress": "^2.13.3",
|
|
42
44
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
43
45
|
"eslint-plugin-html": "^7.1.0",
|
|
44
46
|
"eslint-plugin-import": "^2.27.5",
|
|
45
|
-
"eslint-plugin-jsdoc": "^43.
|
|
47
|
+
"eslint-plugin-jsdoc": "^43.1.1",
|
|
46
48
|
"eslint-plugin-markdown": "^3.0.0",
|
|
47
49
|
"eslint-plugin-n": "^15.7.0",
|
|
48
50
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
@@ -52,13 +54,15 @@
|
|
|
52
54
|
"eslint-plugin-standard": "^4.1.0",
|
|
53
55
|
"eslint-plugin-unicorn": "^46.0.0",
|
|
54
56
|
"fast-deep-equal": "^3.1.3",
|
|
57
|
+
"jsdom": "^21.1.1",
|
|
55
58
|
"npm-run-all": "^4.1.5",
|
|
56
59
|
"nyc": "^15.1.0",
|
|
57
60
|
"open-cli": "^7.2.0",
|
|
58
61
|
"rimraf": "^5.0.0",
|
|
59
|
-
"rollup": "3.
|
|
62
|
+
"rollup": "3.21.4",
|
|
60
63
|
"rollup-plugin-istanbul": "^4.0.0",
|
|
61
|
-
"rollup-plugin-node-builtins": "^2.1.2"
|
|
64
|
+
"rollup-plugin-node-builtins": "^2.1.2",
|
|
65
|
+
"typescript": "^5.0.4"
|
|
62
66
|
},
|
|
63
67
|
"repository": {
|
|
64
68
|
"type": "git",
|
|
@@ -78,6 +82,7 @@
|
|
|
78
82
|
"license": "MIT",
|
|
79
83
|
"homepage": "https://github.com/es-joy/jsoe#readme",
|
|
80
84
|
"scripts": {
|
|
85
|
+
"tsc": "tsc",
|
|
81
86
|
"eslint": "eslint --ext=js,cjs,md,html .",
|
|
82
87
|
"lint": "npm run eslint --",
|
|
83
88
|
"coverage": "open-cli http://localhost:8087/coverage/lcov-report/",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* eslint-disable import/unambiguous -- Testing */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {any} ArbitraryValue
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {ArbitraryValue} t
|
|
9
|
+
* @yields {ArbitraryValue}
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
function * postorder (t) {
|
|
13
|
+
if (Array.isArray(t)) {
|
|
14
|
+
for (const child of t) {
|
|
15
|
+
yield * postorder(child);
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
for (const child of Object.values(t)) {
|
|
19
|
+
yield * postorder(child);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (t !== null && typeof t === 'object' && !Array.isArray(t)) {
|
|
23
|
+
yield t;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const mytree = {
|
|
28
|
+
value: 1,
|
|
29
|
+
children: [
|
|
30
|
+
{
|
|
31
|
+
value: 2,
|
|
32
|
+
children: [{
|
|
33
|
+
value: 4,
|
|
34
|
+
children: []
|
|
35
|
+
}]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: 3,
|
|
39
|
+
children: [
|
|
40
|
+
{
|
|
41
|
+
value: 5,
|
|
42
|
+
children: []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: 6,
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
value: 7,
|
|
49
|
+
children: []
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
console.log([...postorder(mytree)]);
|