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