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

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