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

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