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

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