mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Bump to v3.6.0.
This commit is contained in:
@@ -15,18 +15,18 @@ import isIterateeCall from '../internal/isIterateeCall';
|
||||
* @example
|
||||
*
|
||||
* _.flatten([1, [2, 3, [4]]]);
|
||||
* // => [1, 2, 3, [4]];
|
||||
* // => [1, 2, 3, [4]]
|
||||
*
|
||||
* // using `isDeep`
|
||||
* _.flatten([1, [2, 3, [4]]], true);
|
||||
* // => [1, 2, 3, 4];
|
||||
* // => [1, 2, 3, 4]
|
||||
*/
|
||||
function flatten(array, isDeep, guard) {
|
||||
var length = array ? array.length : 0;
|
||||
if (guard && isIterateeCall(array, isDeep, guard)) {
|
||||
isDeep = false;
|
||||
}
|
||||
return length ? baseFlatten(array, isDeep, false, 0) : [];
|
||||
return length ? baseFlatten(array, isDeep) : [];
|
||||
}
|
||||
|
||||
export default flatten;
|
||||
|
||||
Reference in New Issue
Block a user