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

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