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

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)
})