mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
var arrayPush = require('./arrayPush'),
|
||||
isArguments = require('../lang/isArguments'),
|
||||
isArray = require('../lang/isArray'),
|
||||
isArrayLike = require('./isArrayLike'),
|
||||
isObjectLike = require('./isObjectLike');
|
||||
isArguments = require('../isArguments'),
|
||||
isArray = require('../isArray'),
|
||||
isArrayLikeObject = require('../isArrayLikeObject');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.flatten` with added support for restricting
|
||||
* flattening and specifying the start index.
|
||||
* The base implementation of `_.flatten` with support for restricting flattening.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to flatten.
|
||||
@@ -23,7 +21,7 @@ function baseFlatten(array, isDeep, isStrict, result) {
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (isObjectLike(value) && isArrayLike(value) &&
|
||||
if (isArrayLikeObject(value) &&
|
||||
(isStrict || isArray(value) || isArguments(value))) {
|
||||
if (isDeep) {
|
||||
// Recursively flatten arrays (susceptible to call stack limits).
|
||||
|
||||
Reference in New Issue
Block a user