tree: 4f493af9867dbedf2f5f6a3a08b1129a126c8563 [path history] [tgz]
  1. dist/
  2. internal/
  3. all.js
  4. allLimit.js
  5. allSeries.js
  6. any.js
  7. anyLimit.js
  8. anySeries.js
  9. apply.js
  10. applyEach.js
  11. applyEachSeries.js
  12. asyncify.js
  13. auto.js
  14. autoInject.js
  15. bower.json
  16. cargo.js
  17. CHANGELOG.md
  18. compose.js
  19. concat.js
  20. concatLimit.js
  21. concatSeries.js
  22. constant.js
  23. detect.js
  24. detectLimit.js
  25. detectSeries.js
  26. dir.js
  27. doDuring.js
  28. doUntil.js
  29. doWhilst.js
  30. during.js
  31. each.js
  32. eachLimit.js
  33. eachOf.js
  34. eachOfLimit.js
  35. eachOfSeries.js
  36. eachSeries.js
  37. ensureAsync.js
  38. every.js
  39. everyLimit.js
  40. everySeries.js
  41. filter.js
  42. filterLimit.js
  43. filterSeries.js
  44. find.js
  45. findLimit.js
  46. findSeries.js
  47. foldl.js
  48. foldr.js
  49. forEach.js
  50. forEachLimit.js
  51. forEachOf.js
  52. forEachOfLimit.js
  53. forEachOfSeries.js
  54. forEachSeries.js
  55. forever.js
  56. groupBy.js
  57. groupByLimit.js
  58. groupBySeries.js
  59. index.js
  60. inject.js
  61. LICENSE
  62. log.js
  63. map.js
  64. mapLimit.js
  65. mapSeries.js
  66. mapValues.js
  67. mapValuesLimit.js
  68. mapValuesSeries.js
  69. memoize.js
  70. nextTick.js
  71. package.json
  72. parallel.js
  73. parallelLimit.js
  74. priorityQueue.js
  75. queue.js
  76. race.js
  77. README.md
  78. reduce.js
  79. reduceRight.js
  80. reflect.js
  81. reflectAll.js
  82. reject.js
  83. rejectLimit.js
  84. rejectSeries.js
  85. retry.js
  86. retryable.js
  87. select.js
  88. selectLimit.js
  89. selectSeries.js
  90. seq.js
  91. series.js
  92. setImmediate.js
  93. some.js
  94. someLimit.js
  95. someSeries.js
  96. sortBy.js
  97. timeout.js
  98. times.js
  99. timesLimit.js
  100. timesSeries.js
  101. transform.js
  102. tryEach.js
  103. unmemoize.js
  104. until.js
  105. waterfall.js
  106. whilst.js
  107. wrapSync.js
src/cobalt/debug/remote/devtools/node_modules/async/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)
})