prc b6c02717e6 Upload complete no-internet building environment. 1 年之前
..
dist b6c02717e6 Upload complete no-internet building environment. 1 年之前
internal b6c02717e6 Upload complete no-internet building environment. 1 年之前
CHANGELOG.md b6c02717e6 Upload complete no-internet building environment. 1 年之前
LICENSE b6c02717e6 Upload complete no-internet building environment. 1 年之前
README.md b6c02717e6 Upload complete no-internet building environment. 1 年之前
all.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
allLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
allSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
any.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
anyLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
anySeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
apply.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
applyEach.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
applyEachSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
asyncify.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
auto.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
autoInject.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
bower.json b6c02717e6 Upload complete no-internet building environment. 1 年之前
cargo.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
cargoQueue.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
compose.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
concat.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
concatLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
concatSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
constant.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
detect.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
detectLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
detectSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
dir.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
doDuring.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
doUntil.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
doWhilst.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
during.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
each.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
eachLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
eachOf.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
eachOfLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
eachOfSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
eachSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
ensureAsync.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
every.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
everyLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
everySeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
filter.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
filterLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
filterSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
find.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
findLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
findSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
flatMap.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
flatMapLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
flatMapSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
foldl.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
foldr.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEach.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEachLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEachOf.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEachOfLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEachOfSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forEachSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
forever.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
groupBy.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
groupByLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
groupBySeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
index.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
inject.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
log.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
map.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
mapLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
mapSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
mapValues.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
mapValuesLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
mapValuesSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
memoize.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
nextTick.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
package.json b6c02717e6 Upload complete no-internet building environment. 1 年之前
parallel.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
parallelLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
priorityQueue.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
queue.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
race.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
reduce.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
reduceRight.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
reflect.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
reflectAll.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
reject.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
rejectLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
rejectSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
retry.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
retryable.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
select.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
selectLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
selectSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
seq.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
series.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
setImmediate.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
some.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
someLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
someSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
sortBy.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
timeout.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
times.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
timesLimit.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
timesSeries.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
transform.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
tryEach.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
unmemoize.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
until.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
waterfall.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
whilst.js b6c02717e6 Upload complete no-internet building environment. 1 年之前
wrapSync.js b6c02717e6 Upload complete no-internet building environment. 1 年之前

README.md

Async Logo

Github Actions CI status NPM version Coverage Status 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 i async, it can also be used directly in the browser. A ESM/MJS version is included in the main async package that should automatically be used with compatible bundlers such as Webpack and Rollup.

A pure ESM version of Async is available as async-es.

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