LAPTOP-UBJMM5MG\user d7428fd373 更新 1 yıl önce
..
dist d7428fd373 更新 1 yıl önce
internal d7428fd373 更新 1 yıl önce
CHANGELOG.md d7428fd373 更新 1 yıl önce
LICENSE d7428fd373 更新 1 yıl önce
README.md d7428fd373 更新 1 yıl önce
all.js d7428fd373 更新 1 yıl önce
allLimit.js d7428fd373 更新 1 yıl önce
allSeries.js d7428fd373 更新 1 yıl önce
any.js d7428fd373 更新 1 yıl önce
anyLimit.js d7428fd373 更新 1 yıl önce
anySeries.js d7428fd373 更新 1 yıl önce
apply.js d7428fd373 更新 1 yıl önce
applyEach.js d7428fd373 更新 1 yıl önce
applyEachSeries.js d7428fd373 更新 1 yıl önce
asyncify.js d7428fd373 更新 1 yıl önce
auto.js d7428fd373 更新 1 yıl önce
autoInject.js d7428fd373 更新 1 yıl önce
bower.json d7428fd373 更新 1 yıl önce
cargo.js d7428fd373 更新 1 yıl önce
compose.js d7428fd373 更新 1 yıl önce
concat.js d7428fd373 更新 1 yıl önce
concatLimit.js d7428fd373 更新 1 yıl önce
constant.js d7428fd373 更新 1 yıl önce
detect.js d7428fd373 更新 1 yıl önce
detectLimit.js d7428fd373 更新 1 yıl önce
detectSeries.js d7428fd373 更新 1 yıl önce
dir.js d7428fd373 更新 1 yıl önce
doDuring.js d7428fd373 更新 1 yıl önce
doUntil.js d7428fd373 更新 1 yıl önce
doWhilst.js d7428fd373 更新 1 yıl önce
during.js d7428fd373 更新 1 yıl önce
each.js d7428fd373 更新 1 yıl önce
eachLimit.js d7428fd373 更新 1 yıl önce
eachOf.js d7428fd373 更新 1 yıl önce
eachOfLimit.js d7428fd373 更新 1 yıl önce
eachOfSeries.js d7428fd373 更新 1 yıl önce
eachSeries.js d7428fd373 更新 1 yıl önce
ensureAsync.js d7428fd373 更新 1 yıl önce
every.js d7428fd373 更新 1 yıl önce
everyLimit.js d7428fd373 更新 1 yıl önce
everySeries.js d7428fd373 更新 1 yıl önce
filter.js d7428fd373 更新 1 yıl önce
filterLimit.js d7428fd373 更新 1 yıl önce
filterSeries.js d7428fd373 更新 1 yıl önce
find.js d7428fd373 更新 1 yıl önce
findLimit.js d7428fd373 更新 1 yıl önce
findSeries.js d7428fd373 更新 1 yıl önce
foldl.js d7428fd373 更新 1 yıl önce
foldr.js d7428fd373 更新 1 yıl önce
forEach.js d7428fd373 更新 1 yıl önce
forEachLimit.js d7428fd373 更新 1 yıl önce
forEachOf.js d7428fd373 更新 1 yıl önce
forEachOfLimit.js d7428fd373 更新 1 yıl önce
forEachOfSeries.js d7428fd373 更新 1 yıl önce
forEachSeries.js d7428fd373 更新 1 yıl önce
forever.js d7428fd373 更新 1 yıl önce
groupBy.js d7428fd373 更新 1 yıl önce
groupByLimit.js d7428fd373 更新 1 yıl önce
groupBySeries.js d7428fd373 更新 1 yıl önce
inject.js d7428fd373 更新 1 yıl önce
log.js d7428fd373 更新 1 yıl önce
map.js d7428fd373 更新 1 yıl önce
mapLimit.js d7428fd373 更新 1 yıl önce
mapSeries.js d7428fd373 更新 1 yıl önce
mapValues.js d7428fd373 更新 1 yıl önce
mapValuesLimit.js d7428fd373 更新 1 yıl önce
mapValuesSeries.js d7428fd373 更新 1 yıl önce
memoize.js d7428fd373 更新 1 yıl önce
nextTick.js d7428fd373 更新 1 yıl önce
package.json d7428fd373 更新 1 yıl önce
parallel.js d7428fd373 更新 1 yıl önce
parallelLimit.js d7428fd373 更新 1 yıl önce
priorityQueue.js d7428fd373 更新 1 yıl önce
queue.js d7428fd373 更新 1 yıl önce
race.js d7428fd373 更新 1 yıl önce
reduce.js d7428fd373 更新 1 yıl önce
reduceRight.js d7428fd373 更新 1 yıl önce
reflect.js d7428fd373 更新 1 yıl önce
reflectAll.js d7428fd373 更新 1 yıl önce
reject.js d7428fd373 更新 1 yıl önce
rejectSeries.js d7428fd373 更新 1 yıl önce
retry.js d7428fd373 更新 1 yıl önce
retryable.js d7428fd373 更新 1 yıl önce
select.js d7428fd373 更新 1 yıl önce
selectLimit.js d7428fd373 更新 1 yıl önce
selectSeries.js d7428fd373 更新 1 yıl önce
seq.js d7428fd373 更新 1 yıl önce
setImmediate.js d7428fd373 更新 1 yıl önce
some.js d7428fd373 更新 1 yıl önce
someLimit.js d7428fd373 更新 1 yıl önce
someSeries.js d7428fd373 更新 1 yıl önce
sortBy.js d7428fd373 更新 1 yıl önce
timeout.js d7428fd373 更新 1 yıl önce
times.js d7428fd373 更新 1 yıl önce
timesLimit.js d7428fd373 更新 1 yıl önce
transform.js d7428fd373 更新 1 yıl önce
tryEach.js d7428fd373 更新 1 yıl önce
until.js d7428fd373 更新 1 yıl önce
waterfall.js d7428fd373 更新 1 yıl önce
whilst.js d7428fd373 更新 1 yıl önce
wrapSync.js d7428fd373 更新 1 yıl önce

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