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