Skip to content

Commit e0c1389

Browse files
authoredMar 22, 2020
Add stopOnError option (#6)
1 parent db28613 commit e0c1389

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎index.d.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
declare namespace pAll {
2-
interface Options {
3-
/**
4-
Number of concurrent pending promises. Minimum: `1`.
5-
6-
@default Infinity
7-
*/
8-
concurrency?: number;
9-
}
2+
type Options = import('p-map').Options;
103

114
type PromiseFactory<T> = () => PromiseLike<T>;
125
}

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"bluebird"
4444
],
4545
"dependencies": {
46-
"p-map": "^2.0.0"
46+
"p-map": "^4.0.0"
4747
},
4848
"devDependencies": {
4949
"ava": "^1.4.1",

‎readme.md

+7
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ Minimum: `1`
5959

6060
Number of concurrent pending promises.
6161

62+
##### stopOnError
63+
64+
Type: `boolean`\
65+
Default: `true`
66+
67+
When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.
68+
6269

6370
## Related
6471

0 commit comments

Comments
 (0)
Please sign in to comment.