lodash.flatten
Advanced tools
Comparing version 4.0.0 to 4.1.0
10
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 ./` | ||
@@ -12,3 +12,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
/** | ||
* Flattens `array` a single level. | ||
* Flattens `array` a single level deep. | ||
* | ||
@@ -22,10 +22,10 @@ * @static | ||
* | ||
* _.flatten([1, [2, 3, [4]]]); | ||
* // => [1, 2, 3, [4]] | ||
* _.flatten([1, [2, [3, [4]], 5]]); | ||
* // => [1, 2, [3, [4]], 5] | ||
*/ | ||
function flatten(array) { | ||
var length = array ? array.length : 0; | ||
return length ? baseFlatten(array) : []; | ||
return length ? baseFlatten(array, 1) : []; | ||
} | ||
module.exports = flatten; |
{ | ||
"name": "lodash.flatten", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "The lodash method `_.flatten` exported as a module.", | ||
@@ -8,3 +8,3 @@ "homepage": "https://lodash.com/", | ||
"license": "MIT", | ||
"keywords": "lodash, lodash-modularized, stdlib, util, flatten", | ||
"keywords": "lodash-modularized, flatten", | ||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", | ||
@@ -11,0 +11,0 @@ "contributors": [ |
@@ -1,2 +0,2 @@ | ||
# lodash.flatten v4.0.0 | ||
# lodash.flatten v4.1.0 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.flatten` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#flatten) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.flatten) for more details. | ||
See the [documentation](https://lodash.com/docs#flatten) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.flatten) for more details. |
Sorry, the diff of this file is not supported yet
3388