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

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