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

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