Arrays.each()

Run some logic (the "iteratee") once for each item of an array.

Usage

Hover over inputs/exits for more info.

var Arrays = require('machinepack-arrays');


// Run some logic (the "iteratee") once for each item of an array.

Arrays.each({

array: [ '*' ],

iteratee: '->',

series: false,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

array required

The array to loop over

[ '*' ]
iteratee required

The function to run for each item in the array.

'->'
series

Whether to run iteratee on one item at a time (in series)

false

Exits

error

An unexpected error occurred.

success

OK.