MCPcopy Index your code
hub / github.com/immutable-js/immutable-js / expandNodes

Function expandNodes

src/Map.js:812–820  ·  view source on GitHub ↗
(ownerID, nodes, bitmap, including, node)

Source from the content-addressed store, hash-verified

810}
811
812function expandNodes(ownerID, nodes, bitmap, including, node) {
813 let count = 0;
814 const expandedNodes = new Array(SIZE);
815 for (let ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
816 expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
817 }
818 expandedNodes[including] = node;
819 return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
820}
821
822function popCount(x) {
823 x -= (x >> 1) & 0x55555555;

Callers 1

updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected