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

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