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

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