Opal-Estate-Pro/node_modules/grunt-contrib-watch/node_modules/async
2019-09-13 11:27:52 +07:00
..
dist style Dashboard 2019-09-13 11:27:52 +07:00
internal style Dashboard 2019-09-13 11:27:52 +07:00
all.js style Dashboard 2019-09-13 11:27:52 +07:00
allLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
allSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
any.js style Dashboard 2019-09-13 11:27:52 +07:00
anyLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
anySeries.js style Dashboard 2019-09-13 11:27:52 +07:00
apply.js style Dashboard 2019-09-13 11:27:52 +07:00
applyEach.js style Dashboard 2019-09-13 11:27:52 +07:00
applyEachSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
asyncify.js style Dashboard 2019-09-13 11:27:52 +07:00
auto.js style Dashboard 2019-09-13 11:27:52 +07:00
autoInject.js style Dashboard 2019-09-13 11:27:52 +07:00
bower.json style Dashboard 2019-09-13 11:27:52 +07:00
cargo.js style Dashboard 2019-09-13 11:27:52 +07:00
CHANGELOG.md style Dashboard 2019-09-13 11:27:52 +07:00
compose.js style Dashboard 2019-09-13 11:27:52 +07:00
concat.js style Dashboard 2019-09-13 11:27:52 +07:00
concatLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
concatSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
constant.js style Dashboard 2019-09-13 11:27:52 +07:00
detect.js style Dashboard 2019-09-13 11:27:52 +07:00
detectLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
detectSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
dir.js style Dashboard 2019-09-13 11:27:52 +07:00
doDuring.js style Dashboard 2019-09-13 11:27:52 +07:00
doUntil.js style Dashboard 2019-09-13 11:27:52 +07:00
doWhilst.js style Dashboard 2019-09-13 11:27:52 +07:00
during.js style Dashboard 2019-09-13 11:27:52 +07:00
each.js style Dashboard 2019-09-13 11:27:52 +07:00
eachLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
eachOf.js style Dashboard 2019-09-13 11:27:52 +07:00
eachOfLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
eachOfSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
eachSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
ensureAsync.js style Dashboard 2019-09-13 11:27:52 +07:00
every.js style Dashboard 2019-09-13 11:27:52 +07:00
everyLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
everySeries.js style Dashboard 2019-09-13 11:27:52 +07:00
filter.js style Dashboard 2019-09-13 11:27:52 +07:00
filterLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
filterSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
find.js style Dashboard 2019-09-13 11:27:52 +07:00
findLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
findSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
foldl.js style Dashboard 2019-09-13 11:27:52 +07:00
foldr.js style Dashboard 2019-09-13 11:27:52 +07:00
forEach.js style Dashboard 2019-09-13 11:27:52 +07:00
forEachLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
forEachOf.js style Dashboard 2019-09-13 11:27:52 +07:00
forEachOfLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
forEachOfSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
forEachSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
forever.js style Dashboard 2019-09-13 11:27:52 +07:00
groupBy.js style Dashboard 2019-09-13 11:27:52 +07:00
groupByLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
groupBySeries.js style Dashboard 2019-09-13 11:27:52 +07:00
index.js style Dashboard 2019-09-13 11:27:52 +07:00
inject.js style Dashboard 2019-09-13 11:27:52 +07:00
LICENSE style Dashboard 2019-09-13 11:27:52 +07:00
log.js style Dashboard 2019-09-13 11:27:52 +07:00
map.js style Dashboard 2019-09-13 11:27:52 +07:00
mapLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
mapSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
mapValues.js style Dashboard 2019-09-13 11:27:52 +07:00
mapValuesLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
mapValuesSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
memoize.js style Dashboard 2019-09-13 11:27:52 +07:00
nextTick.js style Dashboard 2019-09-13 11:27:52 +07:00
package.json style Dashboard 2019-09-13 11:27:52 +07:00
parallel.js style Dashboard 2019-09-13 11:27:52 +07:00
parallelLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
priorityQueue.js style Dashboard 2019-09-13 11:27:52 +07:00
queue.js style Dashboard 2019-09-13 11:27:52 +07:00
race.js style Dashboard 2019-09-13 11:27:52 +07:00
README.md style Dashboard 2019-09-13 11:27:52 +07:00
reduce.js style Dashboard 2019-09-13 11:27:52 +07:00
reduceRight.js style Dashboard 2019-09-13 11:27:52 +07:00
reflect.js style Dashboard 2019-09-13 11:27:52 +07:00
reflectAll.js style Dashboard 2019-09-13 11:27:52 +07:00
reject.js style Dashboard 2019-09-13 11:27:52 +07:00
rejectLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
rejectSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
retry.js style Dashboard 2019-09-13 11:27:52 +07:00
retryable.js style Dashboard 2019-09-13 11:27:52 +07:00
select.js style Dashboard 2019-09-13 11:27:52 +07:00
selectLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
selectSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
seq.js style Dashboard 2019-09-13 11:27:52 +07:00
series.js style Dashboard 2019-09-13 11:27:52 +07:00
setImmediate.js style Dashboard 2019-09-13 11:27:52 +07:00
some.js style Dashboard 2019-09-13 11:27:52 +07:00
someLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
someSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
sortBy.js style Dashboard 2019-09-13 11:27:52 +07:00
timeout.js style Dashboard 2019-09-13 11:27:52 +07:00
times.js style Dashboard 2019-09-13 11:27:52 +07:00
timesLimit.js style Dashboard 2019-09-13 11:27:52 +07:00
timesSeries.js style Dashboard 2019-09-13 11:27:52 +07:00
transform.js style Dashboard 2019-09-13 11:27:52 +07:00
tryEach.js style Dashboard 2019-09-13 11:27:52 +07:00
unmemoize.js style Dashboard 2019-09-13 11:27:52 +07:00
until.js style Dashboard 2019-09-13 11:27:52 +07:00
waterfall.js style Dashboard 2019-09-13 11:27:52 +07:00
whilst.js style Dashboard 2019-09-13 11:27:52 +07:00
wrapSync.js style Dashboard 2019-09-13 11:27:52 +07:00

Async Logo

Build Status via Travis CI NPM version Coverage Status Join the chat at https://gitter.im/caolan/async 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)
})