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

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