use slice

This commit is contained in:
weboko 2023-01-24 21:43:13 +01:00
parent 7bc058d094
commit 7fa807c36c
No known key found for this signature in database
5 changed files with 2 additions and 4 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

0
commons.js Normal file
View File

View File

@ -5,9 +5,7 @@ const path = require("path");
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
const output = {
path:
path.join(os.tmpdir(), "_karma_webpack_") +
Math.floor(Math.random() * 1000000),
path: path.resolve(__dirname),
};
module.exports = function (config) {

0
runtime.js Normal file
View File

View File

@ -32,7 +32,7 @@ function concatenate(...input: Uint8Array[]): Uint8Array {
* @returns BigInt
*/
function buildBigIntFromUint8Array(array: Uint8Array): bigint {
const bigEndianArray = array.reverse();
const bigEndianArray = array.slice().reverse();
// hack for Uint8Array.map that has Uint8Array -> Uint8Array definition that prevents from mapping to other types
const hexString = (bigEndianArray as unknown as number[])
.map((b) => b.toString(16).padStart(2, "0"))