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

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)
})