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

README.md

Async Logo

Github Actions CI status NPM version Coverage Status 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 i async, it can also be used directly in the browser. A ESM/MJS version is included in the main async package that should automatically be used with compatible bundlers such as Webpack and Rollup.

A pure ESM version of Async is available as async-es.

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