GT2/Ejectable/node_modules/async
Ren Juan 06c1a5835d set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
..
dist set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
internal set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
CHANGELOG.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
LICENSE set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
README.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
all.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
allLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
allSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
any.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
anyLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
anySeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
apply.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
applyEach.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
applyEachSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
asyncify.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
auto.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
autoInject.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
bower.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
cargo.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
compose.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
concat.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
concatLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
concatSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
constant.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
detect.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
detectLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
detectSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
dir.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
doDuring.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
doUntil.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
doWhilst.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
during.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
each.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
eachLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
eachOf.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
eachOfLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
eachOfSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
eachSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
ensureAsync.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
every.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
everyLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
everySeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
filter.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
filterLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
filterSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
find.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
findLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
findSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
foldl.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
foldr.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEach.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEachLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEachOf.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEachOfLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEachOfSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forEachSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
forever.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
groupBy.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
groupByLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
groupBySeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
index.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
inject.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
log.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
map.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
mapLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
mapSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
mapValues.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
mapValuesLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
mapValuesSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
memoize.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
nextTick.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
package.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
parallel.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
parallelLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
priorityQueue.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
queue.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
race.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
reduce.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
reduceRight.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
reflect.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
reflectAll.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
reject.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
rejectLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
rejectSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
retry.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
retryable.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
select.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
selectLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
selectSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
seq.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
series.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
setImmediate.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
some.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
someLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
someSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
sortBy.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
timeout.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
times.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
timesLimit.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
timesSeries.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
transform.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
tryEach.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
unmemoize.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
until.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
waterfall.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
whilst.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
wrapSync.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00

README.md

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