summaryrefslogtreecommitdiff
path: root/lib/parallel.js
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2018-09-30 17:00:10 -0700
committerGitHub <noreply@github.com>2018-09-30 17:00:10 -0700
commit8aecf108b3922bc5211036706a0f6f75e02bd42b (patch)
tree0f7b6bee315231ef4aefdfbee154822921de231f /lib/parallel.js
parentdf41256f49c9bb3126e035c95aca7860329b6acf (diff)
downloadasync-8aecf108b3922bc5211036706a0f6f75e02bd42b.tar.gz
feat: await-able Async methods (#1572)
* make each and family awaitable * dont pretend they're AsyncFunctions * check errors * ensure function name is preserved somehow * awaitable concat * awaitable detect * awaitable every/filter * awaitable groupBy * awaitable map/mapValues * awaitable reduce * awaitable reject * awaitable some * awaitable transform * awaitable times * awaitable auto * awaitable compose/seq * awaitable whilst/until (lol) * awaitable forever * awaitable parallel/race * awaitable retry * awaitable series (lol) * awaitable tryEach * awaitable waterfall (lol) * lint * cleanup, remove noop and unused internal functions
Diffstat (limited to 'lib/parallel.js')
-rw-r--r--lib/parallel.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/parallel.js b/lib/parallel.js
index edf8be4..fafae9d 100644
--- a/lib/parallel.js
+++ b/lib/parallel.js
@@ -1,5 +1,5 @@
import eachOf from './eachOf';
-import parallel from './internal/parallel';
+import _parallel from './internal/parallel';
/**
* Run the `tasks` collection of functions in parallel, without waiting until
@@ -34,6 +34,7 @@ import parallel from './internal/parallel';
* functions have completed successfully. This function gets a results array
* (or object) containing all the result arguments passed to the task callbacks.
* Invoked with (err, results).
+ * @returns {Promise} a promise, if a callback is not passed
*
* @example
* async.parallel([
@@ -70,6 +71,6 @@ import parallel from './internal/parallel';
* // results is now equals to: {one: 1, two: 2}
* });
*/
-export default function parallelLimit(tasks, callback) {
- parallel(eachOf, tasks, callback);
+export default function parallel(tasks, callback) {
+ return _parallel(eachOf, tasks, callback);
}