oef/node_modules/async
2019-11-04 15:00:46 +01:00
..
dist First commit 2019-11-04 15:00:46 +01:00
internal First commit 2019-11-04 15:00:46 +01:00
all.js First commit 2019-11-04 15:00:46 +01:00
allLimit.js First commit 2019-11-04 15:00:46 +01:00
allSeries.js First commit 2019-11-04 15:00:46 +01:00
any.js First commit 2019-11-04 15:00:46 +01:00
anyLimit.js First commit 2019-11-04 15:00:46 +01:00
anySeries.js First commit 2019-11-04 15:00:46 +01:00
apply.js First commit 2019-11-04 15:00:46 +01:00
applyEach.js First commit 2019-11-04 15:00:46 +01:00
applyEachSeries.js First commit 2019-11-04 15:00:46 +01:00
asyncify.js First commit 2019-11-04 15:00:46 +01:00
auto.js First commit 2019-11-04 15:00:46 +01:00
autoInject.js First commit 2019-11-04 15:00:46 +01:00
bower.json First commit 2019-11-04 15:00:46 +01:00
cargo.js First commit 2019-11-04 15:00:46 +01:00
CHANGELOG.md First commit 2019-11-04 15:00:46 +01:00
compose.js First commit 2019-11-04 15:00:46 +01:00
concat.js First commit 2019-11-04 15:00:46 +01:00
concatLimit.js First commit 2019-11-04 15:00:46 +01:00
concatSeries.js First commit 2019-11-04 15:00:46 +01:00
constant.js First commit 2019-11-04 15:00:46 +01:00
detect.js First commit 2019-11-04 15:00:46 +01:00
detectLimit.js First commit 2019-11-04 15:00:46 +01:00
detectSeries.js First commit 2019-11-04 15:00:46 +01:00
dir.js First commit 2019-11-04 15:00:46 +01:00
doDuring.js First commit 2019-11-04 15:00:46 +01:00
doUntil.js First commit 2019-11-04 15:00:46 +01:00
doWhilst.js First commit 2019-11-04 15:00:46 +01:00
during.js First commit 2019-11-04 15:00:46 +01:00
each.js First commit 2019-11-04 15:00:46 +01:00
eachLimit.js First commit 2019-11-04 15:00:46 +01:00
eachOf.js First commit 2019-11-04 15:00:46 +01:00
eachOfLimit.js First commit 2019-11-04 15:00:46 +01:00
eachOfSeries.js First commit 2019-11-04 15:00:46 +01:00
eachSeries.js First commit 2019-11-04 15:00:46 +01:00
ensureAsync.js First commit 2019-11-04 15:00:46 +01:00
every.js First commit 2019-11-04 15:00:46 +01:00
everyLimit.js First commit 2019-11-04 15:00:46 +01:00
everySeries.js First commit 2019-11-04 15:00:46 +01:00
filter.js First commit 2019-11-04 15:00:46 +01:00
filterLimit.js First commit 2019-11-04 15:00:46 +01:00
filterSeries.js First commit 2019-11-04 15:00:46 +01:00
find.js First commit 2019-11-04 15:00:46 +01:00
findLimit.js First commit 2019-11-04 15:00:46 +01:00
findSeries.js First commit 2019-11-04 15:00:46 +01:00
foldl.js First commit 2019-11-04 15:00:46 +01:00
foldr.js First commit 2019-11-04 15:00:46 +01:00
forEach.js First commit 2019-11-04 15:00:46 +01:00
forEachLimit.js First commit 2019-11-04 15:00:46 +01:00
forEachOf.js First commit 2019-11-04 15:00:46 +01:00
forEachOfLimit.js First commit 2019-11-04 15:00:46 +01:00
forEachOfSeries.js First commit 2019-11-04 15:00:46 +01:00
forEachSeries.js First commit 2019-11-04 15:00:46 +01:00
forever.js First commit 2019-11-04 15:00:46 +01:00
groupBy.js First commit 2019-11-04 15:00:46 +01:00
groupByLimit.js First commit 2019-11-04 15:00:46 +01:00
groupBySeries.js First commit 2019-11-04 15:00:46 +01:00
index.js First commit 2019-11-04 15:00:46 +01:00
inject.js First commit 2019-11-04 15:00:46 +01:00
LICENSE First commit 2019-11-04 15:00:46 +01:00
log.js First commit 2019-11-04 15:00:46 +01:00
map.js First commit 2019-11-04 15:00:46 +01:00
mapLimit.js First commit 2019-11-04 15:00:46 +01:00
mapSeries.js First commit 2019-11-04 15:00:46 +01:00
mapValues.js First commit 2019-11-04 15:00:46 +01:00
mapValuesLimit.js First commit 2019-11-04 15:00:46 +01:00
mapValuesSeries.js First commit 2019-11-04 15:00:46 +01:00
memoize.js First commit 2019-11-04 15:00:46 +01:00
nextTick.js First commit 2019-11-04 15:00:46 +01:00
package.json First commit 2019-11-04 15:00:46 +01:00
parallel.js First commit 2019-11-04 15:00:46 +01:00
parallelLimit.js First commit 2019-11-04 15:00:46 +01:00
priorityQueue.js First commit 2019-11-04 15:00:46 +01:00
queue.js First commit 2019-11-04 15:00:46 +01:00
race.js First commit 2019-11-04 15:00:46 +01:00
README.md First commit 2019-11-04 15:00:46 +01:00
reduce.js First commit 2019-11-04 15:00:46 +01:00
reduceRight.js First commit 2019-11-04 15:00:46 +01:00
reflect.js First commit 2019-11-04 15:00:46 +01:00
reflectAll.js First commit 2019-11-04 15:00:46 +01:00
reject.js First commit 2019-11-04 15:00:46 +01:00
rejectLimit.js First commit 2019-11-04 15:00:46 +01:00
rejectSeries.js First commit 2019-11-04 15:00:46 +01:00
retry.js First commit 2019-11-04 15:00:46 +01:00
retryable.js First commit 2019-11-04 15:00:46 +01:00
select.js First commit 2019-11-04 15:00:46 +01:00
selectLimit.js First commit 2019-11-04 15:00:46 +01:00
selectSeries.js First commit 2019-11-04 15:00:46 +01:00
seq.js First commit 2019-11-04 15:00:46 +01:00
series.js First commit 2019-11-04 15:00:46 +01:00
setImmediate.js First commit 2019-11-04 15:00:46 +01:00
some.js First commit 2019-11-04 15:00:46 +01:00
someLimit.js First commit 2019-11-04 15:00:46 +01:00
someSeries.js First commit 2019-11-04 15:00:46 +01:00
sortBy.js First commit 2019-11-04 15:00:46 +01:00
timeout.js First commit 2019-11-04 15:00:46 +01:00
times.js First commit 2019-11-04 15:00:46 +01:00
timesLimit.js First commit 2019-11-04 15:00:46 +01:00
timesSeries.js First commit 2019-11-04 15:00:46 +01:00
transform.js First commit 2019-11-04 15:00:46 +01:00
tryEach.js First commit 2019-11-04 15:00:46 +01:00
unmemoize.js First commit 2019-11-04 15:00:46 +01:00
until.js First commit 2019-11-04 15:00:46 +01:00
waterfall.js First commit 2019-11-04 15:00:46 +01:00
whilst.js First commit 2019-11-04 15:00:46 +01:00
wrapSync.js First commit 2019-11-04 15:00:46 +01:00

Async Logo

Build Status via Travis CI NPM version Coverage Status Join the chat at https://gitter.im/caolan/async libhive - Open source examples jsDelivr Hits

Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with Node.js and installable via npm install --save async, it can also be used directly in the browser.

This version of the package is optimized for the Node.js environment. If you use Async with webpack, install async-es instead.

For Documentation, visit https://caolan.github.io/async/

For Async v1.5.x documentation, go HERE

// for use with Node-style callbacks...
var async = require("async");

var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
var configs = {};

async.forEachOf(obj, (value, key, callback) => {
    fs.readFile(__dirname + value, "utf8", (err, data) => {
        if (err) return callback(err);
        try {
            configs[key] = JSON.parse(data);
        } catch (e) {
            return callback(e);
        }
        callback();
    });
}, err => {
    if (err) console.error(err.message);
    // configs is now a map of JSON data
    doSomethingWith(configs);
});
var async = require("async");

// ...or ES2017 async functions
async.mapLimit(urls, 5, async function(url) {
    const response = await fetch(url)
    return response.body
}, (err, results) => {
    if (err) throw err
    // results is now an array of the response bodies
    console.log(results)
})