src/third_party/mozjs/extract/js/src/builtin/Iterator.js
/* Iterator Helpers proposal 2.1.5.5 Prelude */
Iterator Helpers proposal 2.1.5.5 Prelude
Iterator Helpers proposal 2 . 1 . 5 . 5 Prelude
function IteratorDrop(limit) {
  const iterated = GetIteratorDirect(this);
  const remaining = ToInteger(limit);
  if (remaining < 0) {
    ThrowRangeError(JSMSG_NEGATIVE_LIMIT);
  }
  const iteratorHelper = NewIteratorHelper();
  const generator = IteratorDropGenerator(iterated, remaining);
  callContentFunction(GeneratorNext, generator);
  UnsafeSetReservedSlot(iteratorHelper, ITERATOR_HELPER_GENERATOR_SLOT, generator);
  return iteratorHelper;
}
function IteratorDrop ( limit ) { const iterated = GetIteratorDirect ( this ) ; const remaining = ToInteger ( limit ) ; if ( remaining < 0 ) { ThrowRangeError ( JSMSG_NEGATIVE_LIMIT ) ; } const iteratorHelper = NewIteratorHelper ( ) ; const generator = IteratorDropGenerator ( iterated , remaining ) ; callContentFunction ( GeneratorNext , generator ) ; UnsafeSetReservedSlot ( iteratorHelper , ITERATOR_HELPER_GENERATOR_SLOT , generator ) ; return iteratorHelper ; }
Iterator Helpers proposal 2.1.5.5 Prelude
Iterator Helpers proposal 2 . 1 . 5 . 5 Prelude
// Step 1. // Step 2. // Step 3.