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