esnext.iterator.for-each.js 357 B

1234567891011
  1. 'use strict';
  2. // https://github.com/tc39/proposal-iterator-helpers
  3. var $ = require('../internals/export');
  4. var iterate = require('../internals/iterate');
  5. var anObject = require('../internals/an-object');
  6. $({ target: 'Iterator', proto: true, real: true }, {
  7. forEach: function forEach(fn) {
  8. iterate(anObject(this), fn, undefined, false, true);
  9. }
  10. });