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

README.md

Async Logo

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