Remove coercion method use.

This commit is contained in:
John-David Dalton
2017-03-13 20:49:45 -07:00
parent 2f281c68b0
commit bb7c959479
33 changed files with 59 additions and 194 deletions

View File

@@ -1,5 +1,4 @@
import baseFlatten from './.internal/baseFlatten.js'
import toInteger from './toInteger.js'
/**
* Recursively flatten `array` up to `depth` times.
@@ -25,7 +24,7 @@ function flattenDepth(array, depth) {
if (!length) {
return []
}
depth = depth === undefined ? 1 : toInteger(depth)
depth = depth === undefined ? 1 : +depth
return baseFlatten(array, depth)
}