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

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