MCPcopy Create free account
hub / github.com/Effect-TS/effect / nextPowerOfTwo

Function nextPowerOfTwo

packages/effect/src/internal/stm/tMap.ts:51–54  ·  view source on GitHub ↗
(size: number)

Source from the content-addressed store, hash-verified

49
50/** @internal */
51const nextPowerOfTwo = (size: number): number => {
52 const n = -1 >>> Math.clz32(size - 1)
53 return n < 0 ? 1 : n + 1
54}
55
56/** @internal */
57const hash = <K>(key: K): number => {

Callers 1

fromIterableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected