@amodx/binary 0.0.17 → 0.0.20

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.
@@ -21,7 +21,9 @@ export class ObjectToTypedNodes {
21
21
  node.value[key] = this._addPrimitive(value);
22
22
  continue;
23
23
  }
24
- if (value instanceof ArrayBuffer || value instanceof SharedArrayBuffer) {
24
+ if (value instanceof ArrayBuffer ||
25
+ (typeof SharedArrayBuffer !== "undefined" &&
26
+ value instanceof SharedArrayBuffer)) {
25
27
  node.value[key] = this._addPrimitive(value);
26
28
  continue;
27
29
  }
@@ -86,7 +88,9 @@ export class ObjectToTypedNodes {
86
88
  if (typeof node == "undefined") {
87
89
  return TypedNodes.undefined();
88
90
  }
89
- if (node instanceof ArrayBuffer || node instanceof SharedArrayBuffer) {
91
+ if (node instanceof ArrayBuffer ||
92
+ (typeof SharedArrayBuffer !== "undefined" &&
93
+ node instanceof SharedArrayBuffer)) {
90
94
  return TypedNodes.arrayBuffer(node);
91
95
  }
92
96
  if (ArrayBuffer.isView(node)) {
package/package.json CHANGED
@@ -1,27 +1 @@
1
- {
2
- "name": "@amodx/binary",
3
- "version": "0.0.17",
4
- "module": "index.js",
5
- "types": "index.d.ts",
6
- "type": "module",
7
- "keywords": [],
8
- "description": "Binary objects and binary tags.",
9
- "scripts": {
10
- "build": "mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cd ./src && npx tsc",
11
- "compile": "cd ./src && npx tsc --watch"
12
- },
13
- "repository": {
14
- "url": "git+https://github.com/Amodx/Libraries.git"
15
- },
16
- "bugs": {
17
- "url": "https://github.com/Amodx/Libraries/issues"
18
- },
19
- "homepage": "https://github.com/Amodx/Libraries",
20
- "author": "Amodx",
21
- "license": "MIT",
22
- "devDependencies": {},
23
- "main": "index.js",
24
- "publishConfig": {
25
- "access": "public"
26
- }
27
- }
1
+ {"name":"@amodx/binary","version":"0.0.20","module":"index.js","types":"index.d.ts","type":"module","keywords":[],"description":"Binary objects and binary tags.","scripts":{"build":"mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cd ./src && npx tsc","compile":"cd ./src && npx tsc --watch"},"repository":{"url":"git+https://github.com/Amodx/Libraries.git"},"bugs":{"url":"https://github.com/Amodx/Libraries/issues"},"homepage":"https://github.com/Amodx/Libraries","author":"Amodx","license":"MIT","devDependencies":{},"main":"index.js","publishConfig":{"access":"public"}}