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

README.md

Async Logo

Build Status via Travis CI NPM version Coverage Status libhive - Open source examples 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 install --save async, it can also be used directly in the browser.

This version of the package is optimized for the Node.js environment. If you use Async with webpack, install async-es instead.

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