msgpackr 1.9.0 → 1.9.1
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-no-eval.cjs +3 -3
- package/dist/index-no-eval.cjs.map +1 -1
- package/dist/index-no-eval.min.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/node.cjs +3 -3
- package/dist/node.cjs.map +1 -1
- package/dist/test.js +3 -3
- package/dist/test.js.map +1 -1
- package/dist/unpack-no-eval.cjs +3 -3
- package/dist/unpack-no-eval.cjs.map +1 -1
- package/package.json +1 -1
- package/unpack.js +3 -3
package/dist/index-no-eval.cjs
CHANGED
|
@@ -926,10 +926,10 @@
|
|
|
926
926
|
currentExtensions[0] = () => {}; // notepack defines extension 0 to mean undefined, so use that as the default here
|
|
927
927
|
currentExtensions[0].noBuffer = true;
|
|
928
928
|
|
|
929
|
-
let
|
|
929
|
+
let glbl = typeof globalThis === 'object' ? globalThis : window;
|
|
930
930
|
currentExtensions[0x65] = () => {
|
|
931
931
|
let data = read();
|
|
932
|
-
return (
|
|
932
|
+
return (glbl[data[0]] || Error)(data[1])
|
|
933
933
|
};
|
|
934
934
|
|
|
935
935
|
currentExtensions[0x69] = (data) => {
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
if (!typedArrayName)
|
|
974
974
|
throw new Error('Could not find typed array for code ' + typeCode)
|
|
975
975
|
// we have to always slice/copy here to get a new ArrayBuffer that is word/byte aligned
|
|
976
|
-
return new
|
|
976
|
+
return new glbl[typedArrayName](Uint8Array.prototype.slice.call(data, 1).buffer)
|
|
977
977
|
};
|
|
978
978
|
currentExtensions[0x78] = () => {
|
|
979
979
|
let data = read();
|