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