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

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