MCPcopy
hub / github.com/immutable-js/immutable-js / __iterator

Method __iterator

src/List.js:212–221  ·  view source on GitHub ↗
(type, reverse)

Source from the content-addressed store, hash-verified

210 }
211
212 __iterator(type, reverse) {
213 let index = reverse ? this.size : 0;
214 const values = iterateList(this, reverse);
215 return new Iterator(() => {
216 const value = values();
217 return value === DONE
218 ? iteratorDone()
219 : iteratorValue(type, reverse ? --index : index++, value);
220 });
221 }
222
223 __iterate(fn, reverse) {
224 let index = reverse ? this.size : 0;

Callers

nothing calls this directly

Calls 4

iteratorDoneFunction · 0.90
iteratorValueFunction · 0.90
iterateListFunction · 0.85
valuesFunction · 0.70

Tested by

no test coverage detected