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

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