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

README.md

Async Logo

Build Status via Travis CI NPM version Coverage Status 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)
})