You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-41Lines changed: 18 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,9 @@ where the reducer transforms an accumulator value based on each item iterated ov
49
49
50
50
**Parameters**
51
51
52
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to reduce
53
-
-`reducer`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function, gets passed `(accumulator, value, index, array)` and returns a new value for `accumulator`
54
-
-`accumulator`**any?** Optional initial accumulator value
52
+
-`array`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to reduce
53
+
-`reducer`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Async function, gets passed `(accumulator, value, index, array)` and returns a new value for `accumulator`
54
+
-`accumulator`**\[any]** Optional initial accumulator value
55
55
56
56
**Examples**
57
57
@@ -68,29 +68,6 @@ await reduce(
68
68
69
69
Returns **any** final `accumulator` value
70
70
71
-
### map
72
-
73
-
Invoke an async transform function on each item in the given Array **in parallel**,
74
-
returning the resulting Array of mapped/transformed items.
75
-
76
-
> This is an asynchronous, parallelized version of `Array.prototype.map()`.
77
-
78
-
**Parameters**
79
-
80
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to map over
81
-
-`mapper`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function, gets passed `(value, index, array)`, returns the new value.
Invoke an async filter function on each item in the given Array **in parallel**,
@@ -100,8 +77,8 @@ returning an Array of values for which the filter function returned a truthy val
100
77
101
78
**Parameters**
102
79
103
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to filter
104
-
-`filterer`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, returns true to keep the value in the resulting filtered Array.
80
+
-`array`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to filter
81
+
-`filterer`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, returns true to keep the value in the resulting filtered Array.
@@ -123,8 +100,8 @@ Invoke an async function on each item in the given Array **in parallel**,
123
100
124
101
**Parameters**
125
102
126
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to find
127
-
-`predicate`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, returns true to be the find result.
103
+
-`array`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to find
104
+
-`predicate`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, returns true to be the find result.
128
105
129
106
**Examples**
130
107
@@ -145,8 +122,8 @@ Checks if predicate returns truthy for **all** elements of collection **in paral
145
122
146
123
**Parameters**
147
124
148
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to iterate over.
149
-
-`predicate`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, The function invoked per iteration.
125
+
-`array`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to iterate over.
126
+
-`predicate`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, The function invoked per iteration.
150
127
151
128
**Examples**
152
129
@@ -157,7 +134,7 @@ await every(
157
134
)
158
135
```
159
136
160
-
Returns **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if **all** element passes the predicate check, else false.
137
+
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if **all** element passes the predicate check, else false.
161
138
162
139
### some
163
140
@@ -167,8 +144,8 @@ Checks if predicate returns truthy for **any** element of collection **in parall
167
144
168
145
**Parameters**
169
146
170
-
-`array`**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to iterate over.
171
-
-`filterer`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, The function invoked per iteration.
147
+
-`array`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** The Array to iterate over.
148
+
-`filterer`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Async function. Gets passed `(value, index, array)`, The function invoked per iteration.
172
149
173
150
**Examples**
174
151
@@ -179,15 +156,15 @@ await some(
179
156
)
180
157
```
181
158
182
-
Returns **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if **any** element passes the predicate check, else false.
159
+
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if **any** element passes the predicate check, else false.
183
160
184
161
### parallel
185
162
186
163
Invoke all async functions in an Array or Object **in parallel**, returning the result.
187
164
188
165
**Parameters**
189
166
190
-
-`list`**([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)> | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)<[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)>)** Array/Object with values that are async functions to invoke.
167
+
-`list`**([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)> | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)<[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)>)** Array/Object with values that are async functions to invoke.
191
168
192
169
**Examples**
193
170
@@ -198,15 +175,15 @@ await parallel([
198
175
])
199
176
```
200
177
201
-
Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\|[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** same structure as `list` input, but with values now resolved.
178
+
Returns **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\|[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** same structure as `list` input, but with values now resolved.
202
179
203
180
### series
204
181
205
182
Invoke all async functions in an Array or Object **sequentially**, returning the result.
206
183
207
184
**Parameters**
208
185
209
-
-`list`**([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)> | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)<[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)>)** Array/Object with values that are async functions to invoke.
186
+
-`list`**([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)> | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)<[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)>)** Array/Object with values that are async functions to invoke.
210
187
211
188
**Examples**
212
189
@@ -217,4 +194,4 @@ await series([
217
194
])
218
195
```
219
196
220
-
Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\|[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** same structure as `list` input, but with values now resolved.
197
+
Returns **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\|[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** same structure as `list` input, but with values now resolved.
0 commit comments