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

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