Skip to content

Commit 96f266e

Browse files
authoredOct 1, 2019
Merge pull request #1604 from renewooller/master
docs: qualified that map must only take finite iterables
2 parents 933b5da + b0ed2e4 commit 96f266e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎docs/docs/api/promise.map.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Promise.map(
1717
) -> Promise
1818
```
1919
20-
Given an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)\(arrays are `Iterable`\), or a promise of an `Iterable`, which produces promises (or a mix of promises and values), iterate over all the values in the `Iterable` into an array and [map the array to another](http://en.wikipedia.org/wiki/Map_\(higher-order_function\)) using the given `mapper` function.
20+
Given a finite [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)\(arrays are `Iterable`\), or a promise of an `Iterable`, which produces promises (or a mix of promises and values), iterate over all the values in the `Iterable` into an array and [map the array to another](http://en.wikipedia.org/wiki/Map_\(higher-order_function\)) using the given `mapper` function.
2121
2222
Promises returned by the `mapper` function are awaited for and the returned promise doesn't fulfill until all mapped promises have fulfilled as well. If any promise in the array is rejected, or any promise returned by the `mapper` function is rejected, the returned promise is rejected as well.
2323

0 commit comments

Comments
 (0)
Please sign in to comment.