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

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