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

Method __iterator

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

Source from the content-addressed store, hash-verified

180 }
181
182 __iterator(type, reverse) {
183 const array = this._array;
184 const size = array.length;
185 let i = 0;
186 return new Iterator(() => {
187 if (i === size) {
188 return iteratorDone();
189 }
190 const ii = reverse ? size - ++i : i++;
191 return iteratorValue(type, ii, array[ii]);
192 });
193 }
194}
195
196class ObjectSeq extends KeyedSeq {

Callers

nothing calls this directly

Calls 2

iteratorDoneFunction · 0.90
iteratorValueFunction · 0.90

Tested by

no test coverage detected