Class: Each

rg-async. Each

Defines a Each class. Provides two methods (each that will run in parallel and eachSeries that will run in series).


new Each()

Author:
Source:

Methods


<static> each(srcArray, consumer)

Invokes in parallel an async consumer function on each item in the given source Array.

Invokes in parallel an async consumer function on each item in the given source Array. This will return a promise without any resolved value.

Parameters:
Name Type Description
srcArray Array

Specifies the source array to consumed.

consumer function

Specifies the async function that will be called with (value, index, array) as arguments.

Source:
Returns:

Returns a promise to be resolved without any value to be resolved.

Type
Promise