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

README.md

Async Logo

Build Status via Travis CI NPM version Coverage Status 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)
})