mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-06-06 09:19:57 +00:00
use slice
This commit is contained in:
parent
7bc058d094
commit
7fa807c36c
0
commons.js
Normal file
0
commons.js
Normal file
@ -5,9 +5,7 @@ const path = require("path");
|
|||||||
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
|
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
|
||||||
|
|
||||||
const output = {
|
const output = {
|
||||||
path:
|
path: path.resolve(__dirname),
|
||||||
path.join(os.tmpdir(), "_karma_webpack_") +
|
|
||||||
Math.floor(Math.random() * 1000000),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
|
|||||||
0
runtime.js
Normal file
0
runtime.js
Normal file
@ -32,7 +32,7 @@ function concatenate(...input: Uint8Array[]): Uint8Array {
|
|||||||
* @returns BigInt
|
* @returns BigInt
|
||||||
*/
|
*/
|
||||||
function buildBigIntFromUint8Array(array: Uint8Array): 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
|
// hack for Uint8Array.map that has Uint8Array -> Uint8Array definition that prevents from mapping to other types
|
||||||
const hexString = (bigEndianArray as unknown as number[])
|
const hexString = (bigEndianArray as unknown as number[])
|
||||||
.map((b) => b.toString(16).padStart(2, "0"))
|
.map((b) => b.toString(16).padStart(2, "0"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user