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: lib/node_modules/@stdlib/utils/inmap-async/README.md
+12-2
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ var inmapAsync = require( '@stdlib/utils/inmap-async' );
25
25
26
26
Invokes a function for each element in a `collection` and updates the `collection` in-place.
27
27
28
+
<!-- eslint-disable no-use-before-define -->
29
+
28
30
```javascript
29
31
functionfcn( value, index, next ) {
30
32
setTimeout( onTimeout, value );
@@ -111,6 +113,8 @@ The function accepts the following `options`:
111
113
112
114
By default, all elements are processed concurrently, which means that the function does __not__ guarantee completion order. To process each `collection` element sequentially, set the `series` option to `true`.
113
115
116
+
<!-- eslint-disable no-use-before-define -->
117
+
114
118
```javascript
115
119
functionfcn( value, index, next ) {
116
120
setTimeout( onTimeout, value );
@@ -125,7 +129,7 @@ function done( error, collection ) {
To set the execution context of `fcn`, set the `thisArg` option.
183
189
190
+
<!-- eslint-disable no-use-before-define -->
191
+
184
192
```javascript
185
193
functionfcn( value, index, next ) {
186
194
this.count+=1;
@@ -202,7 +210,7 @@ function done( error, collection ) {
202
210
var arr = [ 3000, 2500, 1000 ];
203
211
204
212
var context = {
205
-
'count':0
213
+
'count':0
206
214
};
207
215
208
216
var opts = {
@@ -231,6 +239,8 @@ When invoked, `fcn` is provided a maximum of four arguments:
231
239
232
240
The actual number of provided arguments depends on function `length`. If `fcn` accepts two arguments, `fcn` is provided `value` and `next`. If `fcn` accepts three arguments, `fcn` is provided `value`, `index`, and `next`. For every other `fcn` signature, `fcn` is provided all four arguments.
233
241
242
+
<!-- eslint-disable no-use-before-define -->
243
+
234
244
```javascript
235
245
functionfcn( value, i, collection, next ) {
236
246
console.log( 'collection: %s. %d: %d', collection.join( ',' ), i, value );
0 commit comments