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

Function booleanToUint8Array

packages/core/fumadb/src/utils/binary.ts:27–29  ·  view source on GitHub ↗
(bool: boolean)

Source from the content-addressed store, hash-verified

25}
26
27export function booleanToUint8Array(bool: boolean) {
28 return new Uint8Array([bool ? 1 : 0]);
29}
30
31export function uint8ArrayToBoolean(arr: Uint8Array) {
32 return arr[0] !== 0;

Callers 1

migrateDataTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected