32.1 GB
673,093 files
Updated 5 months ago
Name
Size
internal
dist
wrapSync.js3.76 kB
xet
whilst.js2.34 kB
xet
waterfall.js3.2 kB
xet
until.js2.08 kB
xet
unmemoize.js665 Bytes
xet
tryEach.js2.54 kB
xet
transform.js5.56 kB
xet
timesSeries.js1.06 kB
xet
timesLimit.js1.45 kB
xet
times.js1.49 kB
xet
timeout.js2.76 kB
xet
sortBy.js6.21 kB
xet
someSeries.js1.68 kB
xet
someLimit.js1.79 kB
xet
some.js3.8 kB
xet
setImmediate.js1.39 kB
xet
series.js5.82 kB
xet
seq.js2.65 kB
xet
selectSeries.js1.55 kB
xet
selectLimit.js1.66 kB
xet
select.js2.9 kB
xet
retryable.js2.54 kB
xet
retry.js5.52 kB
xet
rejectSeries.js1.47 kB
xet
rejectLimit.js1.58 kB
xet
reject.js2.68 kB
xet
reflectAll.js2.45 kB
xet
reflect.js2.27 kB
xet
reduceRight.js1.5 kB
xet
reduce.js4.88 kB
xet
race.js2.13 kB
xet
queue.js626 Bytes
xet
priorityQueue.js1.44 kB
xet
parallelLimit.js1.51 kB
xet
parallel.js5.57 kB
xet
package.json2.2 kB
xet
nextTick.js1.48 kB
xet
memoize.js3.07 kB
xet
mapValuesSeries.js1.38 kB
xet
mapValuesLimit.js2.12 kB
xet
mapValues.js4.59 kB
xet
mapSeries.js1.52 kB
xet
mapLimit.js1.62 kB
xet
map.js4.6 kB
xet
log.js1.2 kB
xet
inject.js4.88 kB
xet
index.js19.9 kB
xet
groupBySeries.js1.33 kB
xet
groupByLimit.js2.45 kB
xet
groupBy.js3.6 kB
xet
forever.js2.12 kB
xet
forEachSeries.js1.58 kB
xet
forEachOfSeries.js1.33 kB
xet
forEachOfLimit.js1.64 kB
xet
forEachOf.js5.74 kB
xet
forEachLimit.js1.79 kB
xet
forEach.js4.03 kB
xet
foldr.js1.5 kB
xet
foldl.js4.88 kB
xet
flatMapSeries.js1.47 kB
xet
flatMapLimit.js2.09 kB
xet
flatMap.js3.65 kB
xet
findSeries.js1.74 kB
xet
findLimit.js1.84 kB
xet
find.js3.25 kB
xet
filterSeries.js1.55 kB
xet
filterLimit.js1.66 kB
xet
filter.js2.9 kB
xet
everySeries.js1.65 kB
xet
everyLimit.js1.75 kB
xet
every.js3.56 kB
xet
ensureAsync.js2.31 kB
xet
eachSeries.js1.58 kB
xet
eachOfSeries.js1.33 kB
xet
eachOfLimit.js1.64 kB
xet
eachOf.js5.74 kB
xet
eachLimit.js1.79 kB
xet
each.js4.03 kB
xet
during.js2.34 kB
xet
doWhilst.js2.3 kB
xet
doUntil.js1.7 kB
xet
doDuring.js2.3 kB
xet
dir.js1.3 kB
xet
detectSeries.js1.74 kB
xet
detectLimit.js1.84 kB
xet
detect.js3.25 kB
xet
constant.js302 Bytes
xet
concatSeries.js1.47 kB
xet
concatLimit.js2.09 kB
xet
concat.js3.65 kB
xet
compose.js1.57 kB
xet
cargoQueue.js3.35 kB
xet
cargo.js2.75 kB
xet
bower.json239 Bytes
xet
autoInject.js7.1 kB
xet
auto.js11.9 kB
xet
asyncify.js3.76 kB
xet
applyEachSeries.js1.3 kB
xet
README.md

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)
})
Total size
32.1 GB
Files
673,093
Last updated
Mar 19
Pre-warmed CDN
US EU US EU

Contributors