1.0.0 • Published 8 years ago
asyncable v1.0.0
Asyncable.js
Quick Examples
var fsStat = asyncable.thenable(fs.stat);
asyncable
.map(['file1','file2','file3'], fsStat)
.then(function(results) {
// results is now an array of stats for each file
});
var fsExists = asyncable.thenable(fs.exists);
asyncable
.filter(['file1','file2','file3'], fsExists)
.then(function(results) {
// results now equals an array of the existing files
});
asyncable
.parallel([
function() { ... },
function() { ... }
])
.then(function(results) {
});
asyncable
.series([
function() { ... },
function() { ... }
])
.then(function(results) {
});
Download
The source is available for download from
GitHub.
Alternatively, you can install using Node Package Manager (npm
):
npm install asyncable
Documentation
The following are supported.
Collections
each
,eachSeries
,eachLimit
forEachOf
,forEachOfSeries
,forEachOfLimit
map
,mapSeries
,mapLimit
filter
,filterSeries
,filterLimit
reject
,rejectSeries
,rejectLimit
reduce
,reduceRight
detect
,detectSeries
,detectLimit
sortBy
some
,someLimit
every
,everyLimit
concat
,concatSeries
Control Flow
series
parallel
,parallelLimit
whilst
,doWhilst
until
,doUntil
during
,doDuring
forever
waterfall
compose
seq
applyEach
,applyEachSeries
queue
,priorityQueue
cargo
auto
retry
iterator
times
,timesSeries
,timesLimit
Utils
1.0.0
8 years ago