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

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