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