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