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

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