itcast 6e512b8ce6 aaaa 10 ay önce
..
dist 6e512b8ce6 aaaa 10 ay önce
internal 6e512b8ce6 aaaa 10 ay önce
CHANGELOG.md 6e512b8ce6 aaaa 10 ay önce
LICENSE 6e512b8ce6 aaaa 10 ay önce
README.md 6e512b8ce6 aaaa 10 ay önce
all.js 6e512b8ce6 aaaa 10 ay önce
allLimit.js 6e512b8ce6 aaaa 10 ay önce
allSeries.js 6e512b8ce6 aaaa 10 ay önce
any.js 6e512b8ce6 aaaa 10 ay önce
anyLimit.js 6e512b8ce6 aaaa 10 ay önce
anySeries.js 6e512b8ce6 aaaa 10 ay önce
apply.js 6e512b8ce6 aaaa 10 ay önce
applyEach.js 6e512b8ce6 aaaa 10 ay önce
applyEachSeries.js 6e512b8ce6 aaaa 10 ay önce
asyncify.js 6e512b8ce6 aaaa 10 ay önce
auto.js 6e512b8ce6 aaaa 10 ay önce
autoInject.js 6e512b8ce6 aaaa 10 ay önce
bower.json 6e512b8ce6 aaaa 10 ay önce
cargo.js 6e512b8ce6 aaaa 10 ay önce
cargoQueue.js 6e512b8ce6 aaaa 10 ay önce
compose.js 6e512b8ce6 aaaa 10 ay önce
concat.js 6e512b8ce6 aaaa 10 ay önce
concatLimit.js 6e512b8ce6 aaaa 10 ay önce
concatSeries.js 6e512b8ce6 aaaa 10 ay önce
constant.js 6e512b8ce6 aaaa 10 ay önce
detect.js 6e512b8ce6 aaaa 10 ay önce
detectLimit.js 6e512b8ce6 aaaa 10 ay önce
detectSeries.js 6e512b8ce6 aaaa 10 ay önce
dir.js 6e512b8ce6 aaaa 10 ay önce
doDuring.js 6e512b8ce6 aaaa 10 ay önce
doUntil.js 6e512b8ce6 aaaa 10 ay önce
doWhilst.js 6e512b8ce6 aaaa 10 ay önce
during.js 6e512b8ce6 aaaa 10 ay önce
each.js 6e512b8ce6 aaaa 10 ay önce
eachLimit.js 6e512b8ce6 aaaa 10 ay önce
eachOf.js 6e512b8ce6 aaaa 10 ay önce
eachOfLimit.js 6e512b8ce6 aaaa 10 ay önce
eachOfSeries.js 6e512b8ce6 aaaa 10 ay önce
eachSeries.js 6e512b8ce6 aaaa 10 ay önce
ensureAsync.js 6e512b8ce6 aaaa 10 ay önce
every.js 6e512b8ce6 aaaa 10 ay önce
everyLimit.js 6e512b8ce6 aaaa 10 ay önce
everySeries.js 6e512b8ce6 aaaa 10 ay önce
filter.js 6e512b8ce6 aaaa 10 ay önce
filterLimit.js 6e512b8ce6 aaaa 10 ay önce
filterSeries.js 6e512b8ce6 aaaa 10 ay önce
find.js 6e512b8ce6 aaaa 10 ay önce
findLimit.js 6e512b8ce6 aaaa 10 ay önce
findSeries.js 6e512b8ce6 aaaa 10 ay önce
flatMap.js 6e512b8ce6 aaaa 10 ay önce
flatMapLimit.js 6e512b8ce6 aaaa 10 ay önce
flatMapSeries.js 6e512b8ce6 aaaa 10 ay önce
foldl.js 6e512b8ce6 aaaa 10 ay önce
foldr.js 6e512b8ce6 aaaa 10 ay önce
forEach.js 6e512b8ce6 aaaa 10 ay önce
forEachLimit.js 6e512b8ce6 aaaa 10 ay önce
forEachOf.js 6e512b8ce6 aaaa 10 ay önce
forEachOfLimit.js 6e512b8ce6 aaaa 10 ay önce
forEachOfSeries.js 6e512b8ce6 aaaa 10 ay önce
forEachSeries.js 6e512b8ce6 aaaa 10 ay önce
forever.js 6e512b8ce6 aaaa 10 ay önce
groupBy.js 6e512b8ce6 aaaa 10 ay önce
groupByLimit.js 6e512b8ce6 aaaa 10 ay önce
groupBySeries.js 6e512b8ce6 aaaa 10 ay önce
index.js 6e512b8ce6 aaaa 10 ay önce
inject.js 6e512b8ce6 aaaa 10 ay önce
log.js 6e512b8ce6 aaaa 10 ay önce
map.js 6e512b8ce6 aaaa 10 ay önce
mapLimit.js 6e512b8ce6 aaaa 10 ay önce
mapSeries.js 6e512b8ce6 aaaa 10 ay önce
mapValues.js 6e512b8ce6 aaaa 10 ay önce
mapValuesLimit.js 6e512b8ce6 aaaa 10 ay önce
mapValuesSeries.js 6e512b8ce6 aaaa 10 ay önce
memoize.js 6e512b8ce6 aaaa 10 ay önce
nextTick.js 6e512b8ce6 aaaa 10 ay önce
package.json 6e512b8ce6 aaaa 10 ay önce
parallel.js 6e512b8ce6 aaaa 10 ay önce
parallelLimit.js 6e512b8ce6 aaaa 10 ay önce
priorityQueue.js 6e512b8ce6 aaaa 10 ay önce
queue.js 6e512b8ce6 aaaa 10 ay önce
race.js 6e512b8ce6 aaaa 10 ay önce
reduce.js 6e512b8ce6 aaaa 10 ay önce
reduceRight.js 6e512b8ce6 aaaa 10 ay önce
reflect.js 6e512b8ce6 aaaa 10 ay önce
reflectAll.js 6e512b8ce6 aaaa 10 ay önce
reject.js 6e512b8ce6 aaaa 10 ay önce
rejectLimit.js 6e512b8ce6 aaaa 10 ay önce
rejectSeries.js 6e512b8ce6 aaaa 10 ay önce
retry.js 6e512b8ce6 aaaa 10 ay önce
retryable.js 6e512b8ce6 aaaa 10 ay önce
select.js 6e512b8ce6 aaaa 10 ay önce
selectLimit.js 6e512b8ce6 aaaa 10 ay önce
selectSeries.js 6e512b8ce6 aaaa 10 ay önce
seq.js 6e512b8ce6 aaaa 10 ay önce
series.js 6e512b8ce6 aaaa 10 ay önce
setImmediate.js 6e512b8ce6 aaaa 10 ay önce
some.js 6e512b8ce6 aaaa 10 ay önce
someLimit.js 6e512b8ce6 aaaa 10 ay önce
someSeries.js 6e512b8ce6 aaaa 10 ay önce
sortBy.js 6e512b8ce6 aaaa 10 ay önce
timeout.js 6e512b8ce6 aaaa 10 ay önce
times.js 6e512b8ce6 aaaa 10 ay önce
timesLimit.js 6e512b8ce6 aaaa 10 ay önce
timesSeries.js 6e512b8ce6 aaaa 10 ay önce
transform.js 6e512b8ce6 aaaa 10 ay önce
tryEach.js 6e512b8ce6 aaaa 10 ay önce
unmemoize.js 6e512b8ce6 aaaa 10 ay önce
until.js 6e512b8ce6 aaaa 10 ay önce
waterfall.js 6e512b8ce6 aaaa 10 ay önce
whilst.js 6e512b8ce6 aaaa 10 ay önce
wrapSync.js 6e512b8ce6 aaaa 10 ay önce

README.md

Async Logo

Github Actions CI status NPM version Coverage Status 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)
})