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

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