main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
562 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var $forEach = require('../internals/array-iteration').forEach;
|
---|
| 3 | var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
---|
| 4 |
|
---|
| 5 | var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
---|
| 6 |
|
---|
| 7 | // `Array.prototype.forEach` method implementation
|
---|
| 8 | // https://tc39.es/ecma262/#sec-array.prototype.foreach
|
---|
| 9 | module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
---|
| 10 | return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
---|
| 11 | // eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
---|
| 12 | } : [].forEach;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.