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

Async Logo

Github Actions CI status NPM version Coverage Status Join the chat at https://gitter.im/caolan/async 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 i async, it can also be used directly in the browser. A ESM/MJS version is included in the main async package that should automatically be used with compatible bundlers such as Webpack and Rollup.

A pure ESM version of Async is available as async-es.

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