esnext.async-iterator.for-each.js 362 B

1234567891011
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var $forEach = require('../internals/async-iterator-iteration').forEach;
  4. // `AsyncIterator.prototype.forEach` method
  5. // https://github.com/tc39/proposal-async-iterator-helpers
  6. $({ target: 'AsyncIterator', proto: true, real: true }, {
  7. forEach: function forEach(fn) {
  8. return $forEach(this, fn);
  9. }
  10. });