summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/flattenDeep.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/flattenDeep.js')
-rw-r--r--tools/eslint/node_modules/lodash/flattenDeep.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/eslint/node_modules/lodash/flattenDeep.js b/tools/eslint/node_modules/lodash/flattenDeep.js
index 3daab79e14..c20c781a84 100644
--- a/tools/eslint/node_modules/lodash/flattenDeep.js
+++ b/tools/eslint/node_modules/lodash/flattenDeep.js
@@ -1,21 +1,25 @@
var baseFlatten = require('./_baseFlatten');
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
/**
- * This method is like `_.flatten` except that it recursively flattens `array`.
+ * Recursively flattens `array`.
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Array
- * @param {Array} array The array to recursively flatten.
+ * @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
- * _.flattenDeep([1, [2, 3, [4]]]);
- * // => [1, 2, 3, 4]
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
*/
function flattenDeep(array) {
var length = array ? array.length : 0;
- return length ? baseFlatten(array, true) : [];
+ return length ? baseFlatten(array, INFINITY) : [];
}
module.exports = flattenDeep;