@nsshunt/stsobservability 1.0.96 → 1.0.97
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.
|
@@ -4222,12 +4222,15 @@ var ExtensionCodec = (
|
|
|
4222
4222
|
return ExtensionCodec2;
|
|
4223
4223
|
}()
|
|
4224
4224
|
);
|
|
4225
|
+
function isArrayBuffer(buffer) {
|
|
4226
|
+
return buffer instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && buffer instanceof SharedArrayBuffer;
|
|
4227
|
+
}
|
|
4225
4228
|
function ensureUint8Array(buffer) {
|
|
4226
4229
|
if (buffer instanceof Uint8Array) {
|
|
4227
4230
|
return buffer;
|
|
4228
4231
|
} else if (ArrayBuffer.isView(buffer)) {
|
|
4229
4232
|
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
4230
|
-
} else if (buffer
|
|
4233
|
+
} else if (isArrayBuffer(buffer)) {
|
|
4231
4234
|
return new Uint8Array(buffer);
|
|
4232
4235
|
} else {
|
|
4233
4236
|
return Uint8Array.from(buffer);
|