deconstruct-js

Home > deconstruct-js > flags

flags() function

Lets you decode a series of 0s and 1s into a Record of booleans

Signature:

declare function flags<T extends string>(flagNames: readonly T[]): ComplexDeconstructor<Record<T, boolean>>;

Parameters

Parameter Type Description
flagNames readonly T[]  

Returns:

ComplexDeconstructor<Record<T, boolean>>