A tiny, faster alternative to native
Array.prototype.forEach
:warning: Unlike native, @arr/foreach does not support the optional thisArg parameter!
$ npm install --save @arr/foreach
import forEach from '@arr/foreach';
forEach(['a', 'b', 'c'], val => {
console.log(val);
});
//=> a
//=> b
//=> c
Type: Array
The array to iterate upon.
Type: Function
Function to test for each element, taking three arguments:
forEach was called upon.MIT © Luke Edwards