咸鱼要翻身
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
yangqiwen e9ed3cf0b9 咸鱼要翻身 10 months ago
..
dist 咸鱼要翻身 10 months ago
internal 咸鱼要翻身 10 months ago
CHANGELOG.md 咸鱼要翻身 10 months ago
LICENSE 咸鱼要翻身 10 months ago
README.md 咸鱼要翻身 10 months ago
all.js 咸鱼要翻身 10 months ago
allLimit.js 咸鱼要翻身 10 months ago
allSeries.js 咸鱼要翻身 10 months ago
any.js 咸鱼要翻身 10 months ago
anyLimit.js 咸鱼要翻身 10 months ago
anySeries.js 咸鱼要翻身 10 months ago
apply.js 咸鱼要翻身 10 months ago
applyEach.js 咸鱼要翻身 10 months ago
applyEachSeries.js 咸鱼要翻身 10 months ago
asyncify.js 咸鱼要翻身 10 months ago
auto.js 咸鱼要翻身 10 months ago
autoInject.js 咸鱼要翻身 10 months ago
bower.json 咸鱼要翻身 10 months ago
cargo.js 咸鱼要翻身 10 months ago
cargoQueue.js 咸鱼要翻身 10 months ago
compose.js 咸鱼要翻身 10 months ago
concat.js 咸鱼要翻身 10 months ago
concatLimit.js 咸鱼要翻身 10 months ago
concatSeries.js 咸鱼要翻身 10 months ago
constant.js 咸鱼要翻身 10 months ago
detect.js 咸鱼要翻身 10 months ago
detectLimit.js 咸鱼要翻身 10 months ago
detectSeries.js 咸鱼要翻身 10 months ago
dir.js 咸鱼要翻身 10 months ago
doDuring.js 咸鱼要翻身 10 months ago
doUntil.js 咸鱼要翻身 10 months ago
doWhilst.js 咸鱼要翻身 10 months ago
during.js 咸鱼要翻身 10 months ago
each.js 咸鱼要翻身 10 months ago
eachLimit.js 咸鱼要翻身 10 months ago
eachOf.js 咸鱼要翻身 10 months ago
eachOfLimit.js 咸鱼要翻身 10 months ago
eachOfSeries.js 咸鱼要翻身 10 months ago
eachSeries.js 咸鱼要翻身 10 months ago
ensureAsync.js 咸鱼要翻身 10 months ago
every.js 咸鱼要翻身 10 months ago
everyLimit.js 咸鱼要翻身 10 months ago
everySeries.js 咸鱼要翻身 10 months ago
filter.js 咸鱼要翻身 10 months ago
filterLimit.js 咸鱼要翻身 10 months ago
filterSeries.js 咸鱼要翻身 10 months ago
find.js 咸鱼要翻身 10 months ago
findLimit.js 咸鱼要翻身 10 months ago
findSeries.js 咸鱼要翻身 10 months ago
flatMap.js 咸鱼要翻身 10 months ago
flatMapLimit.js 咸鱼要翻身 10 months ago
flatMapSeries.js 咸鱼要翻身 10 months ago
foldl.js 咸鱼要翻身 10 months ago
foldr.js 咸鱼要翻身 10 months ago
forEach.js 咸鱼要翻身 10 months ago
forEachLimit.js 咸鱼要翻身 10 months ago
forEachOf.js 咸鱼要翻身 10 months ago
forEachOfLimit.js 咸鱼要翻身 10 months ago
forEachOfSeries.js 咸鱼要翻身 10 months ago
forEachSeries.js 咸鱼要翻身 10 months ago
forever.js 咸鱼要翻身 10 months ago
groupBy.js 咸鱼要翻身 10 months ago
groupByLimit.js 咸鱼要翻身 10 months ago
groupBySeries.js 咸鱼要翻身 10 months ago
index.js 咸鱼要翻身 10 months ago
inject.js 咸鱼要翻身 10 months ago
log.js 咸鱼要翻身 10 months ago
map.js 咸鱼要翻身 10 months ago
mapLimit.js 咸鱼要翻身 10 months ago
mapSeries.js 咸鱼要翻身 10 months ago
mapValues.js 咸鱼要翻身 10 months ago
mapValuesLimit.js 咸鱼要翻身 10 months ago
mapValuesSeries.js 咸鱼要翻身 10 months ago
memoize.js 咸鱼要翻身 10 months ago
nextTick.js 咸鱼要翻身 10 months ago
package.json 咸鱼要翻身 10 months ago
parallel.js 咸鱼要翻身 10 months ago
parallelLimit.js 咸鱼要翻身 10 months ago
priorityQueue.js 咸鱼要翻身 10 months ago
queue.js 咸鱼要翻身 10 months ago
race.js 咸鱼要翻身 10 months ago
reduce.js 咸鱼要翻身 10 months ago
reduceRight.js 咸鱼要翻身 10 months ago
reflect.js 咸鱼要翻身 10 months ago
reflectAll.js 咸鱼要翻身 10 months ago
reject.js 咸鱼要翻身 10 months ago
rejectLimit.js 咸鱼要翻身 10 months ago
rejectSeries.js 咸鱼要翻身 10 months ago
retry.js 咸鱼要翻身 10 months ago
retryable.js 咸鱼要翻身 10 months ago
select.js 咸鱼要翻身 10 months ago
selectLimit.js 咸鱼要翻身 10 months ago
selectSeries.js 咸鱼要翻身 10 months ago
seq.js 咸鱼要翻身 10 months ago
series.js 咸鱼要翻身 10 months ago
setImmediate.js 咸鱼要翻身 10 months ago
some.js 咸鱼要翻身 10 months ago
someLimit.js 咸鱼要翻身 10 months ago
someSeries.js 咸鱼要翻身 10 months ago
sortBy.js 咸鱼要翻身 10 months ago
timeout.js 咸鱼要翻身 10 months ago
times.js 咸鱼要翻身 10 months ago
timesLimit.js 咸鱼要翻身 10 months ago
timesSeries.js 咸鱼要翻身 10 months ago
transform.js 咸鱼要翻身 10 months ago
tryEach.js 咸鱼要翻身 10 months ago
unmemoize.js 咸鱼要翻身 10 months ago
until.js 咸鱼要翻身 10 months ago
waterfall.js 咸鱼要翻身 10 months ago
whilst.js 咸鱼要翻身 10 months ago
wrapSync.js 咸鱼要翻身 10 months ago

README.md

Async Logo

Build Status via Travis CI Build Status via Azure Pipelines NPM version Coverage Status Join the chat at https://gitter.im/caolan/async 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)
})