esnext.iterator.to-async.js 337 B

12345678910
  1. 'use strict';
  2. // https://github.com/tc39/proposal-iterator-helpers
  3. var $ = require('../internals/export');
  4. var AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');
  5. $({ target: 'Iterator', proto: true, real: true, forced: true }, {
  6. toAsync: function toAsync() {
  7. return new AsyncFromSyncIterator(this);
  8. }
  9. });