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

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