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
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
Copy file name to clipboardExpand all lines: README.md
+19-8
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,17 @@ limitations under the License.
18
18
19
19
-->
20
20
21
+
22
+
<details>
23
+
<summary>
24
+
About stdlib...
25
+
</summary>
26
+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <ahref="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <ahref="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
-`limit`: the maximum number of pending invocations at any one time. Default: `infinity`.
150
-
-`series`: `boolean` indicating whether to sequentially invoke `fcn` for each `collection` element. If `true`, the function sets `options.limit=1`. Default: `false`.
151
-
-`thisArg`: the execution context for `fcn`.
160
+
-**limit**: the maximum number of pending invocations at any one time. Default: `infinity`.
161
+
-**series**: boolean indicating whether to sequentially invoke `fcn` for each `collection` element. If `true`, the function sets `options.limit=1`. Default: `false`.
162
+
-**thisArg**: the execution context for `fcn`.
152
163
153
164
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`.
154
165
@@ -266,10 +277,10 @@ function done( error, collection ) {
266
277
267
278
When invoked, `fcn` is provided a maximum of four arguments:
268
279
269
-
-`value`: collection value.
270
-
-`index`: collection index.
271
-
-`collection`: the input `collection`.
272
-
-`next`: a callback which should be called once `fcn` has finished processing a collection `value`.
280
+
-**value**: collection value.
281
+
-**index**: collection index.
282
+
-**collection**: the input `collection`.
283
+
-**next**: a callback which should be called once `fcn` has finished processing a collection `value`.
273
284
274
285
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.
Copy file name to clipboardExpand all lines: docs/types/index.d.ts
+25-31
Original file line number
Diff line number
Diff line change
@@ -16,91 +16,90 @@
16
16
* limitations under the License.
17
17
*/
18
18
19
-
// TypeScript Version: 2.0
19
+
// TypeScript Version: 4.1
20
20
21
21
/// <reference types="@stdlib/types"/>
22
22
23
-
import{Collection}from'@stdlib/types/object';
23
+
import{Collection}from'@stdlib/types/array';
24
24
25
25
/**
26
26
* Interface defining function options.
27
27
*/
28
-
interfaceOptions{
28
+
interfaceOptions<T,U,V>{
29
29
/**
30
-
* The maximum number of pending invocations at any one time.
30
+
* Execution context.
31
31
*/
32
-
limit?: number;
32
+
thisArg?: ThisParameterType<Fcn<T,U,V>>;
33
33
34
34
/**
35
-
* Boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection (default: false).
35
+
* The maximum number of pending invocations at any one time.
36
36
*/
37
-
series?: boolean;
37
+
limit?: number;
38
38
39
39
/**
40
-
* Execution context.
40
+
* Boolean indicating whether to sequentially invoke the provided function for each `collection` element. If `true`, the function sets `options.limit=1`. Default: false.
41
41
*/
42
-
thisArg?: any;
42
+
series?: boolean;
43
43
}
44
44
45
45
/**
46
46
* Callback invoked either upon processing all collection elements or upon encountering an error.
47
47
*/
48
-
typeDoneNullary=()=>void;
48
+
typeNullary=()=>void;
49
49
50
50
/**
51
51
* Callback invoked either upon processing all collection elements or upon encountering an error.
52
52
*
53
53
* @param error - error argument
54
54
*/
55
-
typeDoneUnary=(error: Error)=>void;
55
+
typeUnary=(error: Error)=>void;
56
56
57
57
/**
58
58
* Callback invoked either upon processing all collection elements or upon encountering an error.
* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.
152
151
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
* Invokes a function once for each element in a collection and updates a collection in-place.
@@ -202,7 +200,6 @@ interface InMapRightAsync {
202
200
* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.
203
201
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
204
202
*
205
-
*
206
203
* @param collection - input collection
207
204
* @param fcn - function to invoke for each element in a collection
208
205
* @param done - function to invoke upon completion
* Returns a function to invoke a function once for each element in a collection and to update the collection in-place.
@@ -248,7 +245,6 @@ interface InMapRightAsync {
248
245
* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.
249
246
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
250
247
*
251
-
*
252
248
* @param options - function options
253
249
* @param options.thisArg - execution context
254
250
* @param options.limit - maximum number of pending invocations at any one time
* Returns a function to invoke a function once for each element in a collection and to update the collection in-place.
@@ -308,7 +304,6 @@ interface InMapRightAsync {
308
304
* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.
309
305
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
310
306
*
311
-
*
312
307
* @param fcn - function to invoke for each element in a collection
313
308
* @throws must provide valid options
314
309
* @returns function which invokes the provided function once for each element in a collection
* - If a provided function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling. Note, however, that the function may have mutated an input collection during prior invocations, resulting in a partially mutated collection.
362
357
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
0 commit comments