Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,5 +1,5 @@
import baseFlatten from './.internal/baseFlatten.js';
import toInteger from './toInteger.js';
import baseFlatten from './.internal/baseFlatten.js'
import toInteger from './toInteger.js'
/**
* Recursively flatten `array` up to `depth` times.
@@ -12,21 +12,21 @@ import toInteger from './toInteger.js';
* @see flatMap, flatMapDeep, flatMapDepth, flattenDeep
* @example
*
* const array = [1, [2, [3, [4]], 5]];
* const array = [1, [2, [3, [4]], 5]]
*
* flattenDepth(array, 1);
* flattenDepth(array, 1)
* // => [1, 2, [3, [4]], 5]
*
* flattenDepth(array, 2);
* flattenDepth(array, 2)
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
const length = array == null ? 0 : array.length;
const length = array == null ? 0 : array.length
if (!length) {
return [];
return []
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
depth = depth === undefined ? 1 : toInteger(depth)
return baseFlatten(array, depth)
}
export default flattenDepth;
export default flattenDepth