MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / uint8ArrayToBigInt

Function uint8ArrayToBigInt

packages/core/fumadb/src/utils/binary.ts:8–15  ·  view source on GitHub ↗
(arr: Uint8Array)

Source from the content-addressed store, hash-verified

6}
7
8export function uint8ArrayToBigInt(arr: Uint8Array) {
9 // Convert Uint8Array to hex string
10 const hex = Array.from(arr)
11 .map((b) => b.toString(16).padStart(2, "0"))
12 .join("");
13
14 return BigInt(`0x${hex}`);
15}
16
17export function stringToUint8Array(str: string) {
18 const encoder = new TextEncoder();

Callers 1

migrateDataTypeFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected