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