Package Exports
- array-for-each-x
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-for-each-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
array-for-each-x
Executes a provided function once for each array element.
Version: 1.1.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports ⏏
This method executes a provided function once for each array element.
Kind: Exported member
Throws:
TypeErrorIf array is null or undefined.TypeErrorIf callBack is not a function.
| Param | Type | Description |
|---|---|---|
| array | array |
The array to iterate over. |
| callBack | function |
Function to execute for each element. |
| [thisArg] | * |
Value to use as this when executing callback. |
Example
var forEach = require('array-for-each-x');
var items = ['item1', 'item2', 'item3'];
var copy = [];
forEach(items, function(item){
copy.push(item)
});