Pibd-21_Alekseev_I.S._Inter.../IP/node_modules/async
VanyaAlekseev ccc3e790bb lab2
2023-12-03 16:59:28 +04:00
..
dist lab2 2023-12-03 16:59:28 +04:00
internal lab2 2023-12-03 16:59:28 +04:00
all.js lab2 2023-12-03 16:59:28 +04:00
allLimit.js lab2 2023-12-03 16:59:28 +04:00
allSeries.js lab2 2023-12-03 16:59:28 +04:00
any.js lab2 2023-12-03 16:59:28 +04:00
anyLimit.js lab2 2023-12-03 16:59:28 +04:00
anySeries.js lab2 2023-12-03 16:59:28 +04:00
apply.js lab2 2023-12-03 16:59:28 +04:00
applyEach.js lab2 2023-12-03 16:59:28 +04:00
applyEachSeries.js lab2 2023-12-03 16:59:28 +04:00
asyncify.js lab2 2023-12-03 16:59:28 +04:00
auto.js lab2 2023-12-03 16:59:28 +04:00
autoInject.js lab2 2023-12-03 16:59:28 +04:00
bower.json lab2 2023-12-03 16:59:28 +04:00
cargo.js lab2 2023-12-03 16:59:28 +04:00
CHANGELOG.md lab2 2023-12-03 16:59:28 +04:00
compose.js lab2 2023-12-03 16:59:28 +04:00
concat.js lab2 2023-12-03 16:59:28 +04:00
concatLimit.js lab2 2023-12-03 16:59:28 +04:00
concatSeries.js lab2 2023-12-03 16:59:28 +04:00
constant.js lab2 2023-12-03 16:59:28 +04:00
detect.js lab2 2023-12-03 16:59:28 +04:00
detectLimit.js lab2 2023-12-03 16:59:28 +04:00
detectSeries.js lab2 2023-12-03 16:59:28 +04:00
dir.js lab2 2023-12-03 16:59:28 +04:00
doDuring.js lab2 2023-12-03 16:59:28 +04:00
doUntil.js lab2 2023-12-03 16:59:28 +04:00
doWhilst.js lab2 2023-12-03 16:59:28 +04:00
during.js lab2 2023-12-03 16:59:28 +04:00
each.js lab2 2023-12-03 16:59:28 +04:00
eachLimit.js lab2 2023-12-03 16:59:28 +04:00
eachOf.js lab2 2023-12-03 16:59:28 +04:00
eachOfLimit.js lab2 2023-12-03 16:59:28 +04:00
eachOfSeries.js lab2 2023-12-03 16:59:28 +04:00
eachSeries.js lab2 2023-12-03 16:59:28 +04:00
ensureAsync.js lab2 2023-12-03 16:59:28 +04:00
every.js lab2 2023-12-03 16:59:28 +04:00
everyLimit.js lab2 2023-12-03 16:59:28 +04:00
everySeries.js lab2 2023-12-03 16:59:28 +04:00
filter.js lab2 2023-12-03 16:59:28 +04:00
filterLimit.js lab2 2023-12-03 16:59:28 +04:00
filterSeries.js lab2 2023-12-03 16:59:28 +04:00
find.js lab2 2023-12-03 16:59:28 +04:00
findLimit.js lab2 2023-12-03 16:59:28 +04:00
findSeries.js lab2 2023-12-03 16:59:28 +04:00
foldl.js lab2 2023-12-03 16:59:28 +04:00
foldr.js lab2 2023-12-03 16:59:28 +04:00
forEach.js lab2 2023-12-03 16:59:28 +04:00
forEachLimit.js lab2 2023-12-03 16:59:28 +04:00
forEachOf.js lab2 2023-12-03 16:59:28 +04:00
forEachOfLimit.js lab2 2023-12-03 16:59:28 +04:00
forEachOfSeries.js lab2 2023-12-03 16:59:28 +04:00
forEachSeries.js lab2 2023-12-03 16:59:28 +04:00
forever.js lab2 2023-12-03 16:59:28 +04:00
groupBy.js lab2 2023-12-03 16:59:28 +04:00
groupByLimit.js lab2 2023-12-03 16:59:28 +04:00
groupBySeries.js lab2 2023-12-03 16:59:28 +04:00
index.js lab2 2023-12-03 16:59:28 +04:00
inject.js lab2 2023-12-03 16:59:28 +04:00
LICENSE lab2 2023-12-03 16:59:28 +04:00
log.js lab2 2023-12-03 16:59:28 +04:00
map.js lab2 2023-12-03 16:59:28 +04:00
mapLimit.js lab2 2023-12-03 16:59:28 +04:00
mapSeries.js lab2 2023-12-03 16:59:28 +04:00
mapValues.js lab2 2023-12-03 16:59:28 +04:00
mapValuesLimit.js lab2 2023-12-03 16:59:28 +04:00
mapValuesSeries.js lab2 2023-12-03 16:59:28 +04:00
memoize.js lab2 2023-12-03 16:59:28 +04:00
nextTick.js lab2 2023-12-03 16:59:28 +04:00
package.json lab2 2023-12-03 16:59:28 +04:00
parallel.js lab2 2023-12-03 16:59:28 +04:00
parallelLimit.js lab2 2023-12-03 16:59:28 +04:00
priorityQueue.js lab2 2023-12-03 16:59:28 +04:00
queue.js lab2 2023-12-03 16:59:28 +04:00
race.js lab2 2023-12-03 16:59:28 +04:00
README.md lab2 2023-12-03 16:59:28 +04:00
reduce.js lab2 2023-12-03 16:59:28 +04:00
reduceRight.js lab2 2023-12-03 16:59:28 +04:00
reflect.js lab2 2023-12-03 16:59:28 +04:00
reflectAll.js lab2 2023-12-03 16:59:28 +04:00
reject.js lab2 2023-12-03 16:59:28 +04:00
rejectLimit.js lab2 2023-12-03 16:59:28 +04:00
rejectSeries.js lab2 2023-12-03 16:59:28 +04:00
retry.js lab2 2023-12-03 16:59:28 +04:00
retryable.js lab2 2023-12-03 16:59:28 +04:00
select.js lab2 2023-12-03 16:59:28 +04:00
selectLimit.js lab2 2023-12-03 16:59:28 +04:00
selectSeries.js lab2 2023-12-03 16:59:28 +04:00
seq.js lab2 2023-12-03 16:59:28 +04:00
series.js lab2 2023-12-03 16:59:28 +04:00
setImmediate.js lab2 2023-12-03 16:59:28 +04:00
some.js lab2 2023-12-03 16:59:28 +04:00
someLimit.js lab2 2023-12-03 16:59:28 +04:00
someSeries.js lab2 2023-12-03 16:59:28 +04:00
sortBy.js lab2 2023-12-03 16:59:28 +04:00
timeout.js lab2 2023-12-03 16:59:28 +04:00
times.js lab2 2023-12-03 16:59:28 +04:00
timesLimit.js lab2 2023-12-03 16:59:28 +04:00
timesSeries.js lab2 2023-12-03 16:59:28 +04:00
transform.js lab2 2023-12-03 16:59:28 +04:00
tryEach.js lab2 2023-12-03 16:59:28 +04:00
unmemoize.js lab2 2023-12-03 16:59:28 +04:00
until.js lab2 2023-12-03 16:59:28 +04:00
waterfall.js lab2 2023-12-03 16:59:28 +04:00
whilst.js lab2 2023-12-03 16:59:28 +04:00
wrapSync.js lab2 2023-12-03 16:59:28 +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)
})