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

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