mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import arrayReduceRight from './.internal/arrayReduceRight.js';
|
||||
import baseEachRight from './.internal/baseEachRight.js';
|
||||
import baseReduce from './.internal/baseReduce.js';
|
||||
import arrayReduceRight from './.internal/arrayReduceRight.js'
|
||||
import baseEachRight from './.internal/baseEachRight.js'
|
||||
import baseReduce from './.internal/baseReduce.js'
|
||||
|
||||
/**
|
||||
* This method is like `reduce` except that it iterates over elements of
|
||||
@@ -15,15 +15,15 @@ import baseReduce from './.internal/baseReduce.js';
|
||||
* @see reduce
|
||||
* @example
|
||||
*
|
||||
* const array = [[0, 1], [2, 3], [4, 5]];
|
||||
* const array = [[0, 1], [2, 3], [4, 5]]
|
||||
*
|
||||
* reduceRight(array, (flattened, other) => flattened.concat(other), []);
|
||||
* reduceRight(array, (flattened, other) => flattened.concat(other), [])
|
||||
* // => [4, 5, 2, 3, 0, 1]
|
||||
*/
|
||||
function reduceRight(collection, iteratee, accumulator) {
|
||||
const func = Array.isArray(collection) ? arrayReduceRight : baseReduce;
|
||||
const initAccum = arguments.length < 3;
|
||||
return func(collection, iteratee, accumulator, initAccum, baseEachRight);
|
||||
const func = Array.isArray(collection) ? arrayReduceRight : baseReduce
|
||||
const initAccum = arguments.length < 3
|
||||
return func(collection, iteratee, accumulator, initAccum, baseEachRight)
|
||||
}
|
||||
|
||||
export default reduceRight;
|
||||
export default reduceRight
|
||||
|
||||
Reference in New Issue
Block a user