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

Async Logo

Build Status via Travis CI NPM version Coverage Status Join the chat at https://gitter.im/caolan/async 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)
})