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

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