* Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]);
(array)
| 7418 | * // => [1, 2, [3, [4]], 5] |
| 7419 | */ |
| 7420 | function flatten(array) { |
| 7421 | var length = array == null ? 0 : array.length; |
| 7422 | return length ? baseFlatten(array, 1) : []; |
| 7423 | } |
| 7424 | |
| 7425 | /** |
| 7426 | * Recursively flattens `array`. |
nothing calls this directly
no test coverage detected