MCPcopy Index your code
hub / github.com/nodejs/node / getElementIterator

Function getElementIterator

test/fixtures/snapshot/typescript.js:1678–1704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1676 var multiMap = new ts.Map();
1677 var size = 0;
1678 function getElementIterator() {
1679 var valueIt = multiMap.values();
1680 var arrayIt;
1681 return {
1682 next: function () {
1683 while (true) {
1684 if (arrayIt) {
1685 var n = arrayIt.next();
1686 if (!n.done) {
1687 return { value: n.value };
1688 }
1689 arrayIt = undefined;
1690 }
1691 else {
1692 var n = valueIt.next();
1693 if (n.done) {
1694 return { value: undefined, done: true };
1695 }
1696 if (!isArray(n.value)) {
1697 return { value: n.value };
1698 }
1699 arrayIt = arrayIterator(n.value);
1700 }
1701 }
1702 }
1703 };
1704 }
1705 var set = {
1706 has: function (element) {
1707 var hash = getHashCode(element);

Callers 1

createSetFunction · 0.85

Calls 4

arrayIteratorFunction · 0.85
isArrayFunction · 0.70
nextMethod · 0.65
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…