About stdlib...
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.
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.
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.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Async utilities.
npm install @stdlib/utils-async
var ns = require( '@stdlib/utils-async' );
Namespace containing async utilities.
var o = ns;
// returns {...}
-
anyByRightAsync( collection, [options,] predicate, done )
: test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. -
anyByAsync( collection, [options,] predicate, done )
: test whether at least one element in a collection passes a test implemented by a predicate function. -
bifurcateByAsync( collection, [options,] predicate, done )
: split values into two groups according to a predicate function. -
composeAsync( ...fcn )
: function composition. -
countByAsync( collection, [options,] indicator, done )
: group values according to an indicator function and return group counts. -
doUntilAsync( fcn, predicate, done[, thisArg ] )
: invoke a function until a test condition is true. -
doWhileAsync( fcn, predicate, done[, thisArg ] )
: invoke a function while a test condition is true. -
everyByRightAsync( collection, [options,] predicate, done )
: test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. -
everyByAsync( collection, [options,] predicate, done )
: test whether all elements in a collection pass a test implemented by a predicate function. -
forEachRightAsync( collection, [options,] fcn, done )
: invoke a function once for each element in a collection, iterating from right to left. -
forEachAsync( collection, [options,] fcn, done )
: invoke a function once for each element in a collection. -
functionSequenceAsync( ...fcn )
: function sequence. -
groupByAsync( collection, [options,] indicator, done )
: group values according to an indicator function. -
ifelseAsync( predicate, x, y, done )
: if a predicate function returns a truthy value, returnx
; otherwise, returny
. -
ifthenAsync( predicate, x, y, done )
: if a predicate function returns a truthy value, invokex
; otherwise, invokey
. -
inmapRightAsync( collection, [options,] fcn, done )
: invoke a function for each element in a collection and update the collection in-place, iterating from right to left. -
inmapAsync( collection, [options,] fcn, done )
: invoke a function for each element in a collection and update the collection in-place. -
mapFunAsync( fcn, n, [options,] done )
: invoke a functionn
times and return an array of accumulated function return values. -
mapKeysAsync( obj, [options,] transform, done )
: map keys from one object to a new object having the same values. -
mapValuesAsync( obj, [options,] transform, done )
: map values from one object to a new object having the same keys. -
noneByRightAsync( collection, [options,] predicate, done )
: test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. -
noneByAsync( collection, [options,] predicate, done )
: test whether all elements in a collection fail a test implemented by a predicate function. -
reduceRightAsync( collection, initial, [options,] reducer, done )
: apply a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left. -
reduceAsync( collection, initial, [options,] reducer, done )
: apply a function against an accumulator and each element in a collection and return the accumulated result. -
waterfall( fcns, clbk[, thisArg] )
: execute functions in series, passing the results of one function as arguments to the next function. -
someByRightAsync( collection, n, [options,] predicate, done )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function, iterating from right to left. -
someByAsync( collection, n, [options,] predicate, done )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function. -
tabulateByAsync( collection, [options,] indicator, done )
: generate a frequency table according to an indicator function. -
trycatchAsync( x, y, done )
: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a callback with a valuey
. -
trythenAsync( x, y, done )
: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a second function. -
untilAsync( predicate, fcn, done[, thisArg ] )
: invoke a function until a test condition is true. -
whileAsync( predicate, fcn, done[, thisArg ] )
: invoke a function while a test condition is true.
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/utils-async' );
console.log( objectKeys( ns ) );
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.