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