typeson-registry 14.2.2 → 14.3.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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -1
- 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 +22 -0
- 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/polyfills/DOMMatrix.d.ts +2 -2
- package/dist/polyfills/DOMMatrix.d.ts.map +1 -1
- package/dist/polyfills/DOMMatrixReadOnly.d.ts +2 -2
- package/dist/polyfills/DOMMatrixReadOnly.d.ts.map +1 -1
- package/dist/presets/structured-cloning-for-storage.d.ts +6 -0
- package/dist/presets/structured-cloning-for-storage.d.ts.map +1 -0
- package/dist/presets/structured-cloning-for-storage.umd.cjs +4 -0
- package/dist/presets/structured-cloning-for-storage.umd.cjs.map +1 -0
- package/package.json +1 -1
- package/polyfills/DOMMatrix.js +2 -2
- package/polyfills/DOMMatrixReadOnly.js +2 -2
- package/polyfills/index.cjs +6 -4
- package/polyfills/index.cjs.map +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -3259,6 +3259,27 @@
|
|
|
3259
3259
|
}
|
|
3260
3260
|
});
|
|
3261
3261
|
|
|
3262
|
+
/**
|
|
3263
|
+
* @type {import('typeson').Preset}
|
|
3264
|
+
*/
|
|
3265
|
+
var structuredCloningForStorage = structuredCloningThrowing.concat({
|
|
3266
|
+
checkSharedArrayBufferException: {
|
|
3267
|
+
test: function test(val) {
|
|
3268
|
+
// Per https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer ,
|
|
3269
|
+
// `SharedArrayBuffer` is a structured-cloneable *transferable*
|
|
3270
|
+
// type only for `postMessage`-style contexts (with
|
|
3271
|
+
// `crossOriginIsolated`); storage-oriented consumers of the
|
|
3272
|
+
// structured clone algorithm (e.g. IndexedDB) reject it
|
|
3273
|
+
// outright instead, so this isn't part of the more general
|
|
3274
|
+
// `structuredCloningThrowing` preset this one builds on.
|
|
3275
|
+
if ({}.toString.call(val).slice(8, -1) === 'SharedArrayBuffer') {
|
|
3276
|
+
throw new DOMException('The object cannot be cloned.', 'DataCloneError');
|
|
3277
|
+
}
|
|
3278
|
+
return false;
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
});
|
|
3282
|
+
|
|
3262
3283
|
/**
|
|
3263
3284
|
* @type {import('typeson').Preset}
|
|
3264
3285
|
*/
|
|
@@ -3327,6 +3348,7 @@
|
|
|
3327
3348
|
exports.sparseUndefined = sparseUndefined;
|
|
3328
3349
|
exports.specialNumbers = specialNumbers;
|
|
3329
3350
|
exports.structuredCloning = expObj;
|
|
3351
|
+
exports.structuredCloningForStorage = structuredCloningForStorage;
|
|
3330
3352
|
exports.structuredCloningThrowing = structuredCloningThrowing;
|
|
3331
3353
|
exports.symbol = symbol;
|
|
3332
3354
|
exports.toStringTag = toStringTag;
|