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