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