API reference / @evolu/common / local-first/Protocol / decodeFlags

Function: decodeFlags()

function decodeFlags(buffer, count): readonly boolean[];

Defined in: packages/common/src/local-first/Protocol.ts:1703

Decodes a byte into an array of boolean flags.

Example

const flags = decodeFlags(buffer, 3); // Decode 3 flags

Parameters

ParameterType
bufferBuffer
countnumber & Brand<"Int"> & Brand<"NonNegative"> & Brand<"Positive">

Returns

readonly boolean[]

Was this page helpful?