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