source: imaps-frontend/node_modules/lodash-es/flattenDeep.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 575 bytes
Line 
1import baseFlatten from './_baseFlatten.js';
2
3/** Used as references for various `Number` constants. */
4var INFINITY = 1 / 0;
5
6/**
7 * Recursively flattens `array`.
8 *
9 * @static
10 * @memberOf _
11 * @since 3.0.0
12 * @category Array
13 * @param {Array} array The array to flatten.
14 * @returns {Array} Returns the new flattened array.
15 * @example
16 *
17 * _.flattenDeep([1, [2, [3, [4]], 5]]);
18 * // => [1, 2, 3, 4, 5]
19 */
20function flattenDeep(array) {
21 var length = array == null ? 0 : array.length;
22 return length ? baseFlatten(array, INFINITY) : [];
23}
24
25export default flattenDeep;
Note: See TracBrowser for help on using the repository browser.