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

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