source: imaps-frontend/node_modules/core-js/modules/es.iterator.for-each.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 664 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var iterate = require('../internals/iterate');
4var aCallable = require('../internals/a-callable');
5var anObject = require('../internals/an-object');
6var getIteratorDirect = require('../internals/get-iterator-direct');
7
8// `Iterator.prototype.forEach` method
9// https://tc39.es/ecma262/#sec-iterator.prototype.foreach
10$({ target: 'Iterator', proto: true, real: true }, {
11 forEach: function forEach(fn) {
12 anObject(this);
13 aCallable(fn);
14 var record = getIteratorDirect(this);
15 var counter = 0;
16 iterate(record, function (value) {
17 fn(value, counter++);
18 }, { IS_RECORD: true });
19 }
20});
Note: See TracBrowser for help on using the repository browser.