lodash.flattendeep
Advanced tools
Comparing version 4.0.0 to 4.1.0
15
index.js
/** | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 4.1.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -11,4 +11,7 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
/** 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`. | ||
* | ||
@@ -18,14 +21,14 @@ * @static | ||
* @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; |
{ | ||
"name": "lodash.flattendeep", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "The lodash method `_.flattenDeep` exported as a module.", | ||
@@ -8,3 +8,3 @@ "homepage": "https://lodash.com/", | ||
"license": "MIT", | ||
"keywords": "lodash, lodash-modularized, stdlib, util, flattendeep", | ||
"keywords": "lodash-modularized, flattendeep", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
@@ -11,0 +11,0 @@ "contributors": [ |
@@ -1,2 +0,2 @@ | ||
# lodash.flattendeep v4.0.0 | ||
# lodash.flattendeep v4.1.0 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.flattenDeep` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#flattenDeep) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.flattendeep) for more details. | ||
See the [documentation](https://lodash.com/docs#flattenDeep) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.flattendeep) for more details. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3516
29