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