DO NOT BLOCK
r14c a31e2ce9f3 0.3.4 2 months ago
__tests__ clean up dependencies, better forEach/map, more unit tests 2 months ago
.gitignore improve compatibility, use microTask to handle scheduling 11 months ago
.node-version clean up dependencies, better forEach/map, more unit tests 2 months ago
LICENSE Update LICENSE 1 year ago
Queue.js async task queue implementation 11 months ago
README.hbs merge README template 1 year ago
README.md map - do not expect collection to be an instance of Array 4 months ago
forEach.js clean up dependencies, better forEach/map, more unit tests 2 months ago
fork.js ret fork should be Promise<any> 11 months ago
map.js clean up dependencies, better forEach/map, more unit tests 2 months ago
microTask.js async task queue implementation 11 months ago
package.json 0.3.4 2 months ago
to.js improve compatibility, use microTask to handle scheduling 11 months ago
yarn.lock clean up dependencies, better forEach/map, more unit tests 2 months ago

README.md

@r14c/async-utils(1) -- async implementations of common utility functions

don't block

async-utils is designed to work with the new async syntax to allow you to write non-blocking code that looks synchronous. functions like Array.prototype.map() are very useful, but operating over large collections will always block. async-utils rethinks a full range of useful tools to work with the event loop rather than against it.

Modules

fork
microTask
to

Functions

fork(fns, predicate)Promise.<any>

execute a chain of async operations using the return value of each function as the argument for the next

microTask(fn)

schedule a task to run on nextTick

to(promise)Promise

fork

fork(fns, predicate) ⇒ Promise.<any>

execute a chain of async operations using the return value of each function as the argument for the next

Kind: global method of fork

Param Type
fns Array.<function(value)>
predicate any

microTask

microTask(fn) ⏏

schedule a task to run on nextTick

Kind: global method of microTask

Param Type
fn function

to

to(promise) ⇒ Promise

Kind: global method of to

Param Type
promise Promise