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

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