src/third_party/mozjs/extract/js/src/builtin/AsyncIteration.js
/* Iterator Helpers proposal 2.1.6.2 Prelude */
Iterator Helpers proposal 2.1.6.2 Prelude
Iterator Helpers proposal 2 . 1 . 6 . 2 Prelude
function AsyncIteratorMap(mapper) {
  const iterated = GetIteratorDirect(this);
  if (!IsCallable(mapper)) {
    ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(0, mapper));
  }
  const iteratorHelper = NewAsyncIteratorHelper();
  const generator = AsyncIteratorMapGenerator(iterated, mapper);
  callFunction(IntrinsicAsyncGeneratorNext, generator);
  UnsafeSetReservedSlot(iteratorHelper, ASYNC_ITERATOR_HELPER_GENERATOR_SLOT, generator);
  return iteratorHelper;
}
function AsyncIteratorMap ( mapper ) { const iterated = GetIteratorDirect ( this ) ; if ( ! IsCallable ( mapper ) ) { ThrowTypeError ( JSMSG_NOT_FUNCTION , DecompileArg ( 0 , mapper ) ) ; } const iteratorHelper = NewAsyncIteratorHelper ( ) ; const generator = AsyncIteratorMapGenerator ( iterated , mapper ) ; callFunction ( IntrinsicAsyncGeneratorNext , generator ) ; UnsafeSetReservedSlot ( iteratorHelper , ASYNC_ITERATOR_HELPER_GENERATOR_SLOT , generator ) ; return iteratorHelper ; }
Iterator Helpers proposal 2.1.6.2 Prelude
Iterator Helpers proposal 2 . 1 . 6 . 2 Prelude
// Step 1. // Step 2.