|
||
---|---|---|
.. | ||
any-by | ||
any-by-right | ||
bifurcate-by | ||
compose | ||
count-by | ||
do-until | ||
do-while | ||
docs/types | ||
every-by | ||
every-by-right | ||
for-each | ||
for-each-right | ||
function-sequence | ||
group-by | ||
if-else | ||
if-then | ||
inmap | ||
inmap-right | ||
lib | ||
map-function | ||
map-keys | ||
map-values | ||
none-by | ||
none-by-right | ||
reduce | ||
reduce-right | ||
series-waterfall | ||
some-by | ||
some-by-right | ||
tabulate-by | ||
try-catch | ||
try-then | ||
until | ||
while | ||
package.json | ||
README.md |
Async
Standard library async utilities.
Usage
var ns = require( '@stdlib/utils/async' );
ns
Standard library 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.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/utils/async' );
console.log( objectKeys( ns ) );