Skip to content

Commit

Permalink
feat: add (U)BigInt64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Jan 30, 2023
1 parent 52c58db commit 4c9e950
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module.exports = {
},
},
env: {
es2020: true,
es6: true,
browser: true,
},
Expand Down
9 changes: 7 additions & 2 deletions Sources/macros.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ TYPED_ARRAYS.Int16Array = Int16Array;
TYPED_ARRAYS.Uint32Array = Uint32Array;
TYPED_ARRAYS.Int32Array = Int32Array;
TYPED_ARRAYS.Uint8ClampedArray = Uint8ClampedArray;
// TYPED_ARRAYS.BigInt64Array = BigInt64Array;
// TYPED_ARRAYS.BigUint64Array = BigUint64Array;

try {
TYPED_ARRAYS.BigInt64Array = BigInt64Array;
TYPED_ARRAYS.BigUint64Array = BigUint64Array;
} catch {
// ignore
}

export function newTypedArray(type, ...args) {
return new (TYPED_ARRAYS[type] || Float64Array)(...args);
Expand Down

0 comments on commit 4c9e950

Please sign in to comment.