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