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

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