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

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