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

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