src/third_party/mozjs/extract/js/src/builtin/Iterator.js
/* Iterator Helpers proposal 2.1.5.3 Prelude */
Iterator Helpers proposal 2.1.5.3 Prelude
Iterator Helpers proposal 2 . 1 . 5 . 3 Prelude
function IteratorFilter(filterer) {
  const iterated = GetIteratorDirect(this);
  if (!IsCallable(filterer)) {
    ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(0, filterer));
  }
  const iteratorHelper = NewIteratorHelper();
  const generator = IteratorFilterGenerator(iterated, filterer);
  callContentFunction(GeneratorNext, generator);
  UnsafeSetReservedSlot(iteratorHelper, ITERATOR_HELPER_GENERATOR_SLOT, generator);
  return iteratorHelper;
}
function IteratorFilter ( filterer ) { const iterated = GetIteratorDirect ( this ) ; if ( ! IsCallable ( filterer ) ) { ThrowTypeError ( JSMSG_NOT_FUNCTION , DecompileArg ( 0 , filterer ) ) ; } const iteratorHelper = NewIteratorHelper ( ) ; const generator = IteratorFilterGenerator ( iterated , filterer ) ; callContentFunction ( GeneratorNext , generator ) ; UnsafeSetReservedSlot ( iteratorHelper , ITERATOR_HELPER_GENERATOR_SLOT , generator ) ; return iteratorHelper ; }
Iterator Helpers proposal 2.1.5.3 Prelude
Iterator Helpers proposal 2 . 1 . 5 . 3 Prelude
// Step 1. // Step 2.