15270821319 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
..
dist 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
internal 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
CHANGELOG.md 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
LICENSE 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
README.md 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
all.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
allLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
allSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
any.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
anyLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
anySeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
apply.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
applyEach.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
applyEachSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
asyncify.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
auto.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
autoInject.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
bower.json 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
cargo.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
cargoQueue.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
compose.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
concat.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
concatLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
concatSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
constant.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
detect.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
detectLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
detectSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
dir.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
doDuring.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
doUntil.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
doWhilst.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
during.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
each.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
eachLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
eachOf.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
eachOfLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
eachOfSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
eachSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
ensureAsync.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
every.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
everyLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
everySeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
filter.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
filterLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
filterSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
find.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
findLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
findSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
flatMap.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
flatMapLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
flatMapSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
foldl.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
foldr.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEach.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEachLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEachOf.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEachOfLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEachOfSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forEachSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
forever.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
groupBy.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
groupByLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
groupBySeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
index.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
inject.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
log.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
map.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
mapLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
mapSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
mapValues.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
mapValuesLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
mapValuesSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
memoize.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
nextTick.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
package.json 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
parallel.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
parallelLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
priorityQueue.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
queue.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
race.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
reduce.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
reduceRight.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
reflect.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
reflectAll.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
reject.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
rejectLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
rejectSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
retry.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
retryable.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
select.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
selectLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
selectSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
seq.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
series.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
setImmediate.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
some.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
someLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
someSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
sortBy.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
timeout.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
times.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
timesLimit.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
timesSeries.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
transform.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
tryEach.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
unmemoize.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
until.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
waterfall.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
whilst.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce
wrapSync.js 4e5c5d37f9 初步设计数据库,注册登录 10 ay önce

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