Function chunkAsyncParallel
- chunkAsyncParallel<T, K>(array, fn, chunkSize, parallelism?): Promise<K[]>
-
Parameters
-
array: T[]
-
fn: ((chunk, index, array) => K[] | Promise<K[]>)
-
- (chunk, index, array): K[] | Promise<K[]>
-
Parameters
-
chunk: T[]
-
index: number
-
array: T[]
Returns K[] | Promise<K[]>
-
chunkSize: number
-
parallelism: number = 2
Returns Promise<K[]>
Array of results
Executed the callback function on each chunk in the array limiting the number of parallel executions up to the
parallelism
number passed.