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

Method expand

packages/effect/src/internal/hashMap.ts:581–590  ·  view source on GitHub ↗
(edit: number, bitmap: number, children: Array<Node<K, V>>)

Source from the content-addressed store, hash-verified

579 }
580
581 private expand(edit: number, bitmap: number, children: Array<Node<K, V>>): ArrayNode<K, V> {
582 const nodes: Array<Node<K, V> | undefined> = new globalThis.Array(BUCKET_SIZE)
583 let j = 0
584 for (let i = 0; i < BUCKET_SIZE; i++) {
585 if ((bitmap & (1 << i)) !== 0) {
586 nodes[i] = children[j++]
587 }
588 }
589 return new ArrayNode(edit, children.length, nodes)
590 }
591
592 iterator(): Iterator<[K, V]> {
593 let childIndex = 0

Callers 1

setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected