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

Function bigintToUint8Array

packages/core/fumadb/src/utils/binary.ts:1–6  ·  view source on GitHub ↗
(bigint: bigint)

Source from the content-addressed store, hash-verified

1export function bigintToUint8Array(bigint: bigint) {
2 const bytes = new Uint8Array(8);
3 const view = new DataView(bytes.buffer);
4 view.setBigInt64(0, bigint, false);
5 return bytes;
6}
7
8export function uint8ArrayToBigInt(arr: Uint8Array) {
9 // Convert Uint8Array to hex string

Callers 1

migrateDataTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected