Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/lib. A collection of common utilities I need. www.npmjs.com/package/@samual/lib
Something went wrong. Try again.
12345678910/** Count the number of bits needed to represent a bigint. */export function countBigIntBits(bigint: bigint) { let bits = 0n
while (bigint > 2n ** bits) bits++
return bits}