src/third_party/mozjs/extract/js/src/builtin/Iterator.js
/* Iterator Helpers proposal 2.1.5.3 Body */
Iterator Helpers proposal 2.1.5.3 Body
Iterator Helpers proposal 2 . 1 . 5 . 3 Body
function* IteratorFilterGenerator(iterated, filterer) {
  let lastValue;
  let needClose = true;
  try {
    yield;
    needClose = false;
    for (let next = IteratorStep(iterated, lastValue);
        next;
        next = IteratorStep(iterated, lastValue)) {
      const value = next.value;
      needClose = true;
      if (callContentFunction(filterer, undefined, value)) {
        lastValue = yield value;
      }
      needClose = false;
    }
  } finally {
    if (needClose) {
      IteratorClose(iterated);
    }
  }
}
function * IteratorFilterGenerator ( iterated , filterer ) { let lastValue ; let needClose = true ; try { yield ; needClose = false ; for ( let next = IteratorStep ( iterated , lastValue ) ; next ; next = IteratorStep ( iterated , lastValue ) ) { const value = next . value ; needClose = true ; if ( callContentFunction ( filterer , undefined , value ) ) { lastValue = yield value ; } needClose = false ; } } finally { if ( needClose ) { IteratorClose ( iterated ) ; } } }
Iterator Helpers proposal 2.1.5.3 Body
Iterator Helpers proposal 2 . 1 . 5 . 3 Body
// Step 1. // Step 2. // Step c. // Steps d-g.