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

Method __iterator

src/Seq.js:231–243  ·  view source on GitHub ↗
(type, reverse)

Source from the content-addressed store, hash-verified

229 }
230
231 __iterator(type, reverse) {
232 const object = this._object;
233 const keys = this._keys;
234 const size = keys.length;
235 let i = 0;
236 return new Iterator(() => {
237 if (i === size) {
238 return iteratorDone();
239 }
240 const key = keys[reverse ? size - ++i : i++];
241 return iteratorValue(type, key, object[key]);
242 });
243 }
244}
245ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;
246

Callers

nothing calls this directly

Calls 2

iteratorDoneFunction · 0.90
iteratorValueFunction · 0.90

Tested by

no test coverage detected