typeson-registry 8.0.0 → 9.1.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 +6 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -36
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.cjs +421 -281
- package/dist/index.umd.cjs.map +1 -1
- package/dist/index.umd.min.cjs +1 -1
- package/dist/index.umd.min.cjs.map +1 -1
- package/dist/presets/array-nonindex-keys.umd.cjs +1 -1
- package/dist/presets/array-nonindex-keys.umd.cjs.map +1 -1
- package/dist/presets/builtin.umd.cjs +1 -1
- package/dist/presets/builtin.umd.cjs.map +1 -1
- package/dist/presets/postmessage.umd.cjs.map +1 -1
- package/dist/presets/socketio.umd.cjs +1 -1
- package/dist/presets/socketio.umd.cjs.map +1 -1
- package/dist/presets/sparse-undefined.umd.cjs +1 -1
- package/dist/presets/sparse-undefined.umd.cjs.map +1 -1
- package/dist/presets/special-numbers.umd.cjs +1 -1
- package/dist/presets/special-numbers.umd.cjs.map +1 -1
- package/dist/presets/structured-cloning-throwing.d.ts.map +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs +1 -1
- package/dist/presets/structured-cloning-throwing.umd.cjs.map +1 -1
- package/dist/presets/structured-cloning.d.ts.map +1 -1
- package/dist/presets/structured-cloning.umd.cjs +1 -1
- package/dist/presets/structured-cloning.umd.cjs.map +1 -1
- package/dist/presets/undef.umd.cjs +1 -1
- package/dist/presets/undef.umd.cjs.map +1 -1
- package/dist/presets/universal.umd.cjs +1 -1
- package/dist/presets/universal.umd.cjs.map +1 -1
- package/dist/types/bigint-object.d.ts.map +1 -1
- package/dist/types/bigint-object.umd.cjs.map +1 -1
- package/dist/types/bigint.d.ts.map +1 -1
- package/dist/types/bigint.umd.cjs.map +1 -1
- package/dist/types/blob.umd.cjs.map +1 -1
- package/dist/types/cloneable.umd.cjs.map +1 -1
- package/dist/types/cryptokey.umd.cjs +1 -1
- package/dist/types/cryptokey.umd.cjs.map +1 -1
- package/dist/types/domexception.d.ts +6 -0
- package/dist/types/domexception.d.ts.map +1 -0
- package/dist/types/domexception.umd.cjs +2 -0
- package/dist/types/domexception.umd.cjs.map +1 -0
- package/dist/types/dommatrix.d.ts +6 -0
- package/dist/types/dommatrix.d.ts.map +1 -0
- package/dist/types/dommatrix.umd.cjs +2 -0
- package/dist/types/dommatrix.umd.cjs.map +1 -0
- package/dist/types/dompoint.d.ts +6 -0
- package/dist/types/dompoint.d.ts.map +1 -0
- package/dist/types/dompoint.umd.cjs +2 -0
- package/dist/types/dompoint.umd.cjs.map +1 -0
- package/dist/types/domrect.d.ts +6 -0
- package/dist/types/domrect.d.ts.map +1 -0
- package/dist/types/domrect.umd.cjs +2 -0
- package/dist/types/domrect.umd.cjs.map +1 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.umd.cjs.map +1 -1
- package/dist/types/file.umd.cjs.map +1 -1
- package/dist/types/filelist.umd.cjs.map +1 -1
- package/dist/types/imagebitmap.umd.cjs +1 -1
- package/dist/types/imagebitmap.umd.cjs.map +1 -1
- package/dist/types/infinity.umd.cjs +1 -1
- package/dist/types/infinity.umd.cjs.map +1 -1
- package/dist/types/nan.umd.cjs +1 -1
- package/dist/types/nan.umd.cjs.map +1 -1
- package/dist/types/negative-infinity.umd.cjs +1 -1
- package/dist/types/negative-infinity.umd.cjs.map +1 -1
- package/dist/types/negative-zero.umd.cjs +1 -1
- package/dist/types/negative-zero.umd.cjs.map +1 -1
- package/dist/types/nonbuiltin-ignore.umd.cjs +1 -1
- package/dist/types/nonbuiltin-ignore.umd.cjs.map +1 -1
- package/dist/types/resurrectable.umd.cjs.map +1 -1
- package/dist/types/undef.umd.cjs +1 -1
- package/dist/types/undef.umd.cjs.map +1 -1
- package/dist/types/user-object.umd.cjs +1 -1
- package/dist/types/user-object.umd.cjs.map +1 -1
- package/dist/utils/generateUUID.d.ts.map +1 -1
- package/package.json +46 -45
- package/polyfills/createObjectURL.js +2 -2
- package/polyfills/createObjectURL.umd.cjs +1 -1
- package/polyfills/createObjectURL.umd.cjs.map +1 -1
- package/utils/generateUUID.js +3 -5
- package/utils/stringArrayBuffer.js +1 -1
package/README.md
CHANGED
|
@@ -227,8 +227,13 @@ Note that the type name corresponds to the file name in the following manner:
|
|
|
227
227
|
you are polyfilling a standard object, we welcome you to submit back as a
|
|
228
228
|
PR!). The clones cannot be revived past the current window session,
|
|
229
229
|
however.
|
|
230
|
+
- `cryptokey`
|
|
230
231
|
- `dataview`
|
|
231
232
|
- `date`
|
|
233
|
+
- `domexception`
|
|
234
|
+
- `dommatrix`
|
|
235
|
+
- `dompoint`
|
|
236
|
+
- `domrect`
|
|
232
237
|
- `error.js` (`Error`) and `errors.js` (`TypeError`, `RangeError`, `SyntaxError`, `ReferenceError`, `EvalError`, `URIError`, `InternalError`) - These
|
|
233
238
|
provide a means of resurrecting error object across cloning boundaries
|
|
234
239
|
(since they are not otherwise treated as cloneable by the Structured
|
|
@@ -247,6 +252,7 @@ Note that the type name corresponds to the file name in the following manner:
|
|
|
247
252
|
- `map`
|
|
248
253
|
- `nan` - Preserves `NaN` (not a number)
|
|
249
254
|
- `NegativeInfinity` - Preserves negative infinity
|
|
255
|
+
- `negative-zero` - Preserves `-0` (produces + or - Infinity when used as divisor)
|
|
250
256
|
- `nonBuiltInIgnore` - For roughly detecting non-builtin objects and to avoid
|
|
251
257
|
adding them as properties
|
|
252
258
|
- `primitive-objects.js` (`StringObject`, `BooleanObject`, `NumberObject`)
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ import cloneable from './types/cloneable.js';
|
|
|
7
7
|
import cryptokey from './types/cryptokey.js';
|
|
8
8
|
import dataview from './types/dataview.js';
|
|
9
9
|
import date from './types/date.js';
|
|
10
|
+
import domexception from './types/domexception.js';
|
|
11
|
+
import dommatrix from './types/dommatrix.js';
|
|
12
|
+
import dompoint from './types/dompoint.js';
|
|
13
|
+
import domrect from './types/domrect.js';
|
|
10
14
|
import error from './types/error.js';
|
|
11
15
|
import errors from './types/errors.js';
|
|
12
16
|
import file from './types/file.js';
|
|
@@ -38,6 +42,5 @@ import structuredCloningThrowing from './presets/structured-cloning-throwing.js'
|
|
|
38
42
|
import structuredCloning from './presets/structured-cloning.js';
|
|
39
43
|
import undefPreset from './presets/undef.js';
|
|
40
44
|
import universal from './presets/universal.js';
|
|
41
|
-
export { arraybuffer, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, error, errors, file, filelist, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, regexp, resurrectable, set, typedArraysSocketio, typedArrays, undef, userObject, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
43
|
-
export type * from 'typeson';
|
|
45
|
+
export { arraybuffer, bigintObject, bigint, blob, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domrect, error, errors, file, filelist, imagebitmap, imagedata, infinity, intlTypes, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, primitiveObjects, regexp, resurrectable, set, typedArraysSocketio, typedArrays, undef, userObject, arrayNonindexKeys, builtin, postmessage, socketio, sparseUndefined, specialNumbers, structuredCloningThrowing, structuredCloning, undefPreset, universal };
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;yBACvB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";wBAGwB,wBAAwB;yBACvB,0BAA0B;mBAChC,mBAAmB;iBACrB,iBAAiB;sBACZ,sBAAsB;sBACtB,sBAAsB;qBACvB,qBAAqB;iBACzB,iBAAiB;yBACT,yBAAyB;sBAC5B,sBAAsB;qBACvB,qBAAqB;oBACtB,oBAAoB;kBACtB,kBAAkB;mBACjB,mBAAmB;iBACrB,iBAAiB;qBACb,qBAAqB;wBAClB,wBAAwB;sBAC1B,sBAAsB;qBACvB,qBAAqB;sBACpB,uBAAuB;gBAC7B,gBAAgB;gBAChB,gBAAgB;6BACH,8BAA8B;yBAClC,0BAA0B;6BACtB,8BAA8B;6BAC9B,8BAA8B;mBACxC,mBAAmB;0BACZ,0BAA0B;gBACpC,gBAAgB;gCACA,kCAAkC;wBAC1C,yBAAyB;kBAC/B,kBAAkB;uBACb,wBAAwB;8BAGjB,kCAAkC;oBAC5C,sBAAsB;wBAClB,0BAA0B;qBAC7B,uBAAuB;4BAChB,+BAA+B;2BAChC,8BAA8B;sCAErD,0CAA0C;8BAChB,iCAAiC;wBACvC,oBAAoB;sBACtB,wBAAwB"}
|
package/dist/index.js
CHANGED
|
@@ -136,8 +136,6 @@ const arraybuffer = {
|
|
|
136
136
|
|
|
137
137
|
// See also typed-arrays!
|
|
138
138
|
|
|
139
|
-
/* globals BigInt */
|
|
140
|
-
|
|
141
139
|
/**
|
|
142
140
|
* @type {import('typeson').TypeSpecSet}
|
|
143
141
|
*/
|
|
@@ -155,8 +153,6 @@ const bigintObject = {
|
|
|
155
153
|
}
|
|
156
154
|
};
|
|
157
155
|
|
|
158
|
-
/* globals BigInt */
|
|
159
|
-
|
|
160
156
|
/**
|
|
161
157
|
* @type {import('typeson').TypeSpecSet}
|
|
162
158
|
*/
|
|
@@ -233,7 +229,7 @@ function string2arraybuffer (str) {
|
|
|
233
229
|
|
|
234
230
|
const array = new Uint8Array(str.length);
|
|
235
231
|
for (let i = 0; i < str.length; i++) {
|
|
236
|
-
// eslint-disable-next-line max-len -- Long
|
|
232
|
+
// eslint-disable-next-line @stylistic/max-len -- Long
|
|
237
233
|
// eslint-disable-next-line unicorn/prefer-code-point -- Iterating char. codes
|
|
238
234
|
array[i] = str.charCodeAt(i); // & 0xff;
|
|
239
235
|
}
|
|
@@ -296,8 +292,6 @@ const blob = {
|
|
|
296
292
|
}
|
|
297
293
|
};
|
|
298
294
|
|
|
299
|
-
/* globals performance */
|
|
300
|
-
|
|
301
295
|
// The `performance` global is optional
|
|
302
296
|
|
|
303
297
|
/**
|
|
@@ -317,13 +311,13 @@ function generateUUID () { // Adapted from original: public domain/MIT: http://
|
|
|
317
311
|
? performance.now()
|
|
318
312
|
: 0);
|
|
319
313
|
|
|
320
|
-
// eslint-disable-next-line max-len -- Long
|
|
314
|
+
// eslint-disable-next-line @stylistic/max-len -- Long
|
|
321
315
|
// eslint-disable-next-line no-use-extend-native/no-use-extend-native -- Need to update plugin
|
|
322
316
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replaceAll(/[xy]/gu, function (c) {
|
|
323
317
|
/* eslint-disable no-bitwise */
|
|
324
|
-
const r = Math.trunc((d + Math.random() * 16) % 16);
|
|
318
|
+
const r = Math.trunc((d + (Math.random() * 16)) % 16);
|
|
325
319
|
d = Math.floor(d / 16);
|
|
326
|
-
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
|
|
320
|
+
return (c === 'x' ? r : ((r & 0x3) | 0x8)).toString(16);
|
|
327
321
|
/* eslint-enable no-bitwise */
|
|
328
322
|
});
|
|
329
323
|
}
|
|
@@ -486,6 +480,122 @@ const date = {
|
|
|
486
480
|
}
|
|
487
481
|
};
|
|
488
482
|
|
|
483
|
+
/**
|
|
484
|
+
* @type {import('typeson').TypeSpecSet}
|
|
485
|
+
*/
|
|
486
|
+
const domexception = {
|
|
487
|
+
domexception: {
|
|
488
|
+
test (x) { return toStringTag(x) === 'DOMException'; },
|
|
489
|
+
replace (de) {
|
|
490
|
+
// `code` is based on `name` and readonly, so no
|
|
491
|
+
// need to keep here
|
|
492
|
+
return {
|
|
493
|
+
name: de.name,
|
|
494
|
+
message: de.message
|
|
495
|
+
};
|
|
496
|
+
},
|
|
497
|
+
revive ({message, name}) {
|
|
498
|
+
return new DOMException(message, name);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
/* globals DOMMatrix */
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* @type {import('typeson').TypeSpecSet}
|
|
507
|
+
*/
|
|
508
|
+
const dommatrix = {
|
|
509
|
+
dommatrix: {
|
|
510
|
+
test (x) { return toStringTag(x) === 'DOMMatrix'; },
|
|
511
|
+
replace (dm) {
|
|
512
|
+
if (dm.is2D) {
|
|
513
|
+
return {
|
|
514
|
+
a: dm.a,
|
|
515
|
+
b: dm.b,
|
|
516
|
+
c: dm.c,
|
|
517
|
+
d: dm.d,
|
|
518
|
+
e: dm.e,
|
|
519
|
+
f: dm.f
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
return {
|
|
523
|
+
m11: dm.m11,
|
|
524
|
+
m12: dm.m12,
|
|
525
|
+
m13: dm.m13,
|
|
526
|
+
m14: dm.m14,
|
|
527
|
+
m21: dm.m21,
|
|
528
|
+
m22: dm.m22,
|
|
529
|
+
m23: dm.m23,
|
|
530
|
+
m24: dm.m24,
|
|
531
|
+
m31: dm.m31,
|
|
532
|
+
m32: dm.m32,
|
|
533
|
+
m33: dm.m33,
|
|
534
|
+
m34: dm.m34,
|
|
535
|
+
m41: dm.m41,
|
|
536
|
+
m42: dm.m42,
|
|
537
|
+
m43: dm.m43,
|
|
538
|
+
m44: dm.m44
|
|
539
|
+
};
|
|
540
|
+
},
|
|
541
|
+
revive (o) {
|
|
542
|
+
if (Object.hasOwn(o, 'a')) {
|
|
543
|
+
return new DOMMatrix([o.a, o.b, o.c, o.d, o.e, o.f]);
|
|
544
|
+
}
|
|
545
|
+
return new DOMMatrix([
|
|
546
|
+
o.m11, o.m12, o.m13, o.m14,
|
|
547
|
+
o.m21, o.m22, o.m23, o.m24,
|
|
548
|
+
o.m31, o.m32, o.m33, o.m34,
|
|
549
|
+
o.m41, o.m42, o.m43, o.m44
|
|
550
|
+
]);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
/* globals DOMPoint */
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @type {import('typeson').TypeSpecSet}
|
|
559
|
+
*/
|
|
560
|
+
const dompoint = {
|
|
561
|
+
dompoint: {
|
|
562
|
+
test (x) { return toStringTag(x) === 'DOMPoint'; },
|
|
563
|
+
replace (dp) {
|
|
564
|
+
return {
|
|
565
|
+
x: dp.x,
|
|
566
|
+
y: dp.y,
|
|
567
|
+
z: dp.z,
|
|
568
|
+
w: dp.w
|
|
569
|
+
};
|
|
570
|
+
},
|
|
571
|
+
revive ({x, y, z, w}) {
|
|
572
|
+
return new DOMPoint(x, y, z, w);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
/* globals DOMRect */
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* @type {import('typeson').TypeSpecSet}
|
|
581
|
+
*/
|
|
582
|
+
const domrect = {
|
|
583
|
+
domrect: {
|
|
584
|
+
test (x) { return toStringTag(x) === 'DOMRect'; },
|
|
585
|
+
replace (dr) {
|
|
586
|
+
return {
|
|
587
|
+
x: dr.x,
|
|
588
|
+
y: dr.y,
|
|
589
|
+
width: dr.width,
|
|
590
|
+
height: dr.height
|
|
591
|
+
};
|
|
592
|
+
},
|
|
593
|
+
revive ({x, y, width, height}) {
|
|
594
|
+
return new DOMRect(x, y, width, height);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
|
|
489
599
|
/**
|
|
490
600
|
* @type {import('typeson').TypeSpecSet}
|
|
491
601
|
*/
|
|
@@ -541,9 +651,12 @@ if (typeof AggregateError !== 'undefined') {
|
|
|
541
651
|
create$2(AggregateError);
|
|
542
652
|
}
|
|
543
653
|
|
|
544
|
-
/* c8 ignore next
|
|
545
|
-
// @ts-
|
|
546
|
-
typeof InternalError === 'function'
|
|
654
|
+
/* c8 ignore next 5 */
|
|
655
|
+
// @ts-expect-error Non-standard
|
|
656
|
+
if (typeof InternalError === 'function') {
|
|
657
|
+
// @ts-expect-error Non-standard
|
|
658
|
+
create$2(InternalError);
|
|
659
|
+
}
|
|
547
660
|
|
|
548
661
|
/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/131 */
|
|
549
662
|
/**
|
|
@@ -725,7 +838,7 @@ const filelist = {
|
|
|
725
838
|
}
|
|
726
839
|
};
|
|
727
840
|
|
|
728
|
-
/* globals createImageBitmap */
|
|
841
|
+
/* globals document, createImageBitmap */
|
|
729
842
|
// `ImageBitmap` is browser / DOM specific. It also can only work
|
|
730
843
|
// same-domain (or CORS)
|
|
731
844
|
|
|
@@ -837,8 +950,8 @@ const imagedata = {
|
|
|
837
950
|
const infinity = {
|
|
838
951
|
infinity: {
|
|
839
952
|
test (x) { return x === Number.POSITIVE_INFINITY; },
|
|
840
|
-
replace (n) { return 'Infinity'; },
|
|
841
|
-
revive (s) { return Number.POSITIVE_INFINITY; }
|
|
953
|
+
replace (/* n */) { return 'Infinity'; },
|
|
954
|
+
revive (/* s */) { return Number.POSITIVE_INFINITY; }
|
|
842
955
|
}
|
|
843
956
|
};
|
|
844
957
|
|
|
@@ -894,8 +1007,8 @@ const map = {
|
|
|
894
1007
|
const nan = {
|
|
895
1008
|
nan: {
|
|
896
1009
|
test (x) { return Number.isNaN(x); },
|
|
897
|
-
replace (n) { return 'NaN'; },
|
|
898
|
-
revive (s) { return Number.NaN; }
|
|
1010
|
+
replace (/* n */) { return 'NaN'; },
|
|
1011
|
+
revive (/* s */) { return Number.NaN; }
|
|
899
1012
|
}
|
|
900
1013
|
};
|
|
901
1014
|
|
|
@@ -905,8 +1018,8 @@ const nan = {
|
|
|
905
1018
|
const negativeInfinity = {
|
|
906
1019
|
negativeInfinity: {
|
|
907
1020
|
test (x) { return x === Number.NEGATIVE_INFINITY; },
|
|
908
|
-
replace (n) { return '-Infinity'; },
|
|
909
|
-
revive (s) { return Number.NEGATIVE_INFINITY; }
|
|
1021
|
+
replace (/* n */) { return '-Infinity'; },
|
|
1022
|
+
revive (/* s */) { return Number.NEGATIVE_INFINITY; }
|
|
910
1023
|
}
|
|
911
1024
|
};
|
|
912
1025
|
|
|
@@ -918,11 +1031,11 @@ const negativeZero = {
|
|
|
918
1031
|
test (x) {
|
|
919
1032
|
return Object.is(x, -0);
|
|
920
1033
|
},
|
|
921
|
-
replace (n) {
|
|
1034
|
+
replace (/* n */) {
|
|
922
1035
|
// Just adding 0 here for minimized space; will still revive as -0
|
|
923
1036
|
return 0;
|
|
924
1037
|
},
|
|
925
|
-
revive (s) {
|
|
1038
|
+
revive (/* s */) {
|
|
926
1039
|
return -0;
|
|
927
1040
|
}
|
|
928
1041
|
}
|
|
@@ -954,7 +1067,7 @@ const nonbuiltinIgnore = {
|
|
|
954
1067
|
'Atomics', 'Module'
|
|
955
1068
|
].includes(toStringTag(x));
|
|
956
1069
|
},
|
|
957
|
-
replace (rexp) {
|
|
1070
|
+
replace (/* rexp */) {
|
|
958
1071
|
// Not in use
|
|
959
1072
|
}
|
|
960
1073
|
}
|
|
@@ -1243,8 +1356,8 @@ const undef$1 = {
|
|
|
1243
1356
|
return typeof x === 'undefined' &&
|
|
1244
1357
|
(stateObj.ownKeys || !('ownKeys' in stateObj));
|
|
1245
1358
|
},
|
|
1246
|
-
replace (n) { return 0; },
|
|
1247
|
-
revive (s
|
|
1359
|
+
replace (/* n */) { return 0; },
|
|
1360
|
+
revive (/* s */) {
|
|
1248
1361
|
// Will add `undefined` (returning `undefined` would instead
|
|
1249
1362
|
// avoid explicitly setting)
|
|
1250
1363
|
return new s();
|
|
@@ -1257,7 +1370,7 @@ const undef$1 = {
|
|
|
1257
1370
|
*/
|
|
1258
1371
|
const userObject = {
|
|
1259
1372
|
userObject: {
|
|
1260
|
-
test (x, stateObj) { return isUserObject(x); },
|
|
1373
|
+
test (x /* , stateObj */) { return isUserObject(x); },
|
|
1261
1374
|
replace (n) { return {...n}; },
|
|
1262
1375
|
revive (s) { return s; }
|
|
1263
1376
|
}
|
|
@@ -1323,8 +1436,8 @@ const arrayNonindexKeys = [
|
|
|
1323
1436
|
test (x, stateObj) {
|
|
1324
1437
|
return typeof x === 'undefined' && stateObj.ownKeys === false;
|
|
1325
1438
|
},
|
|
1326
|
-
replace (n) { return 0; },
|
|
1327
|
-
revive (s) { return undefined; } // Will avoid adding anything
|
|
1439
|
+
replace (/* n */) { return 0; },
|
|
1440
|
+
revive (/* s */) { return undefined; } // Will avoid adding anything
|
|
1328
1441
|
}
|
|
1329
1442
|
}
|
|
1330
1443
|
];
|
|
@@ -1438,8 +1551,8 @@ const sparseUndefined = [
|
|
|
1438
1551
|
test (x, stateObj) {
|
|
1439
1552
|
return typeof x === 'undefined' && stateObj.ownKeys === false;
|
|
1440
1553
|
},
|
|
1441
|
-
replace (n) { return 0; },
|
|
1442
|
-
revive (s) { return undefined; } // Will avoid adding anything
|
|
1554
|
+
replace (/* n */) { return 0; },
|
|
1555
|
+
revive (/* s */) { return undefined; } // Will avoid adding anything
|
|
1443
1556
|
}
|
|
1444
1557
|
}
|
|
1445
1558
|
];
|
|
@@ -1481,15 +1594,19 @@ const expObj = [
|
|
|
1481
1594
|
/* c8 ignore next */
|
|
1482
1595
|
typeof DataView === 'function' ? dataview : [],
|
|
1483
1596
|
/* c8 ignore next */
|
|
1484
|
-
typeof Intl !== 'undefined' ? intlTypes : [],
|
|
1485
|
-
/* c8 ignore next */
|
|
1486
1597
|
typeof crypto !== 'undefined' ? cryptokey : [],
|
|
1487
1598
|
/* c8 ignore next */
|
|
1488
|
-
typeof BigInt !== 'undefined' ? [bigint, bigintObject] : []
|
|
1599
|
+
typeof BigInt !== 'undefined' ? [bigint, bigintObject] : [],
|
|
1600
|
+
/* c8 ignore next */
|
|
1601
|
+
typeof DOMException !== 'undefined' ? domexception : [],
|
|
1602
|
+
/* c8 ignore next */
|
|
1603
|
+
typeof DOMRect !== 'undefined' ? domrect : [],
|
|
1604
|
+
/* c8 ignore next */
|
|
1605
|
+
typeof DOMPoint !== 'undefined' ? dompoint : [],
|
|
1606
|
+
/* c8 ignore next */
|
|
1607
|
+
typeof DOMMatrix !== 'undefined' ? dommatrix : []
|
|
1489
1608
|
);
|
|
1490
1609
|
|
|
1491
|
-
/* globals DOMException */
|
|
1492
|
-
|
|
1493
1610
|
/**
|
|
1494
1611
|
* @type {import('typeson').Preset}
|
|
1495
1612
|
*/
|
|
@@ -1585,5 +1702,5 @@ const universal = [
|
|
|
1585
1702
|
// built-in into ecmasript standard.
|
|
1586
1703
|
];
|
|
1587
1704
|
|
|
1588
|
-
export { u as JSON_TYPES, c as Typeson, e as TypesonPromise, s as Undefined, arrayNonindexKeys, arraybuffer, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, hasConstructorOf, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningThrowing, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject };
|
|
1705
|
+
export { u as JSON_TYPES, c as Typeson, e as TypesonPromise, s as Undefined, arrayNonindexKeys, arraybuffer, bigint, bigintObject, blob, expObj$1 as builtin, cloneable, cryptokey, dataview, date, domexception, dommatrix, dompoint, domrect, error, errors, escapeKeyPathComponent, file, filelist, getByKeyPath, getJSONType, hasConstructorOf, imagebitmap, imagedata, infinity, intlTypes, isObject, isPlainObject, isThenable, isUserObject, map, nan, negativeInfinity, negativeZero, nonbuiltinIgnore, postmessage, primitiveObjects, regexp, resurrectable, set, setAtKeyPath, socketio, sparseUndefined, specialNumbers, expObj as structuredCloning, structuredCloningThrowing, toStringTag, typedArrays, typedArraysSocketIO as typedArraysSocketio, undef$1 as undef, undef as undefPreset, unescapeKeyPathComponent, universal, userObject };
|
|
1589
1706
|
//# sourceMappingURL=index.js.map
|