cbor-x 1.5.2 → 1.5.3

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/encode.js CHANGED
@@ -4,7 +4,7 @@ try {
4
4
  textEncoder = new TextEncoder()
5
5
  } catch (error) {}
6
6
  let extensions, extensionClasses
7
- const Buffer = globalThis.Buffer
7
+ const Buffer = typeof globalThis === 'object' && globalThis.Buffer;
8
8
  const hasNodeBuffer = typeof Buffer !== 'undefined'
9
9
  const ByteArrayAllocate = hasNodeBuffer ? Buffer.allocUnsafeSlow : Uint8Array
10
10
  const ByteArray = hasNodeBuffer ? Buffer : Uint8Array
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cbor-x",
3
3
  "author": "Kris Zyp",
4
- "version": "1.5.2",
4
+ "version": "1.5.3",
5
5
  "description": "Ultra-fast and conformant CBOR (RFC 8949) implementation with support for numerous tag extensions including records and structured cloning",
6
6
  "license": "MIT",
7
7
  "types": "./index.d.ts",