From 8aecf108b3922bc5211036706a0f6f75e02bd42b Mon Sep 17 00:00:00 2001 From: Alex Early Date: Sun, 30 Sep 2018 17:00:10 -0700 Subject: 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 --- lib/reduceRight.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/reduceRight.js') diff --git a/lib/reduceRight.js b/lib/reduceRight.js index dd56a88..994eaf9 100644 --- a/lib/reduceRight.js +++ b/lib/reduceRight.js @@ -21,8 +21,9 @@ import reduce from './reduce'; * @param {Function} [callback] - A callback which is called after all the * `iteratee` functions have finished. Result is the reduced value. Invoked with * (err, result). + * @returns {Promise} a promise, if no callback is passed */ export default function reduceRight (array, memo, iteratee, callback) { var reversed = [...array].reverse(); - reduce(reversed, memo, iteratee, callback); + return reduce(reversed, memo, iteratee, callback); } -- cgit v1.2.1