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