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