MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / forEach

Method forEach

src/BitSet.ts:16–26  ·  view source on GitHub ↗
(fn: (n: number) => void)

Source from the content-addressed store, hash-verified

14 }
15
16 forEach(fn: (n: number) => void): void {
17 const bits = this.bits
18 for (let w = 0; w < bits.length; w++) {
19 let word = bits[w]
20 while (word) {
21 const lowest = word & -word
22 fn((w << 5) + 31 - Math.clz32(lowest))
23 word ^= lowest
24 }
25 }
26 }
27}

Callers 15

indentMethod · 0.80
replaceMethod · 0.80
addSourceMethod · 0.80
cloneMethod · 0.80
generateDecodedMapMethod · 0.80
getIndentStringMethod · 0.80
indentMethod · 0.80
indentMethod · 0.80
replaceMethod · 0.80
addSourceMethod · 0.80
cloneMethod · 0.80
generateDecodedMapMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected