@amodx/binary 0.0.0 → 0.0.11
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.
|
@@ -235,8 +235,8 @@ export class BufferToObject {
|
|
|
235
235
|
},
|
|
236
236
|
[BinaryObjectMarkers.TypedArray]: (dv, index) => {
|
|
237
237
|
const type = ByteDataGet[BinaryNumberTypes.Uint8](dv, index + 1);
|
|
238
|
-
if (
|
|
239
|
-
throw new Error();
|
|
238
|
+
if (type === undefined)
|
|
239
|
+
throw new Error(`Not a valid type for a typed array ${type}`);
|
|
240
240
|
const length = ByteDataGet[BinaryNumberTypes.Uint32](dv, index + 2);
|
|
241
241
|
index += ByteCounts.Uint8 * 2 + ByteCounts.Uint32;
|
|
242
242
|
let array;
|
|
@@ -21,7 +21,8 @@ export class ObjectToTypedNodes {
|
|
|
21
21
|
node.value[key] = this._addPrimitive(value);
|
|
22
22
|
continue;
|
|
23
23
|
}
|
|
24
|
-
if (value instanceof Blob ||
|
|
24
|
+
if (value instanceof Blob ||
|
|
25
|
+
(typeof File !== "undefined" && value instanceof File)) {
|
|
25
26
|
continue;
|
|
26
27
|
}
|
|
27
28
|
if (typeof value == "object" && !Array.isArray(value)) {
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
2
|
+
"name": "@amodx/binary",
|
|
3
|
+
"version": "0.0.11",
|
|
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
|
+
}
|