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