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