MCPcopy
hub / github.com/facebook/react / getBitLength

Function getBitLength

packages/react-server/src/ReactFizzTreeContext.js:146–148  ·  view source on GitHub ↗
(number: number)

Source from the content-addressed store, hash-verified

144}
145
146function getBitLength(number: number): number {
147 return 32 - clz32(number);
148}
149
150function getLeadingBit(id: number) {
151 return 1 << (getBitLength(id) - 1);

Callers 2

pushTreeContextFunction · 0.70
getLeadingBitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected