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

Function numberToUint8Array

packages/core/fumadb/src/utils/binary.ts:35–40  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

33}
34
35export function numberToUint8Array(num: number) {
36 const bytes = new Uint8Array(8);
37 const view = new DataView(bytes.buffer);
38 view.setFloat64(0, num, false);
39 return bytes;
40}
41
42export function uint8ArrayToNumber(arr: Uint8Array) {
43 const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);

Callers 1

migrateDataTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected