node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / countZeroes

Function: countZeroes()

countZeroes(value): number

Defined in: src/bits.ts:118

Count zero bits from LSB up to and including the highest set bit. For zero input, returns 0.

Parameters

value

number | bigint

Input value.

Returns

number

Zero count up to the left-most set bit.

Throws

If value is negative or an unsafe integer.