* Recursively flatten `array` up to `depth` times. * * @static * @memberOf _ * @since 4.4.0 * @category Array * @param {Array} array The array to flatten. * @param {number} [depth=1] The maximum recursion depth. * @returns {Arra
(array, depth)
| 17994 | * // => [1, 2, 3, [4], 5] |
| 17995 | */ |
| 17996 | function flattenDepth(array, depth) { |
| 17997 | var length = array == null ? 0 : array.length; |
| 17998 | if (!length) { |
| 17999 | return []; |
| 18000 | } |
| 18001 | depth = depth === undefined ? 1 : toInteger(depth); |
| 18002 | return baseFlatten(array, depth); |
| 18003 | } |
| 18004 | |
| 18005 | /** |
| 18006 | * The inverse of `_.toPairs`; this method returns an object composed |
nothing calls this directly
no test coverage detected