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