esnext.async-iterator.to-array.js 371 B

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