Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash._baseflatten

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash._baseflatten - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

19

index.js
/**
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
* lodash 4.1.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`

@@ -57,3 +57,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

* @param {Array} array The array to flatten.
* @param {boolean} [isDeep] Specify a deep flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.

@@ -63,3 +63,3 @@ * @param {Array} [result=[]] The initial result value.

*/
function baseFlatten(array, isDeep, isStrict, result) {
function baseFlatten(array, depth, isStrict, result) {
result || (result = []);

@@ -72,7 +72,7 @@

var value = array[index];
if (isArrayLikeObject(value) &&
if (depth > 0 && isArrayLikeObject(value) &&
(isStrict || isArray(value) || isArguments(value))) {
if (isDeep) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, isDeep, isStrict, result);
baseFlatten(value, depth - 1, isStrict, result);
} else {

@@ -140,3 +140,3 @@ arrayPush(result, value);

* @memberOf _
* @type Function
* @type {Function}
* @category Lang

@@ -168,3 +168,2 @@ * @param {*} value The value to check.

* @memberOf _
* @type Function
* @category Lang

@@ -198,3 +197,2 @@ * @param {*} value The value to check.

* @memberOf _
* @type Function
* @category Lang

@@ -270,3 +268,4 @@ * @param {*} value The value to check.

function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

@@ -273,0 +272,0 @@

{
"name": "lodash._baseflatten",
"version": "4.0.1",
"version": "4.1.0",
"description": "The internal lodash function `baseFlatten` exported as a module.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/",

@@ -1,2 +0,2 @@

# lodash._baseflatten v4.0.1
# lodash._baseflatten v4.1.0

@@ -18,2 +18,2 @@ The internal [lodash](https://lodash.com/) function `baseFlatten` exported as a [Node.js](https://nodejs.org/) module.

See the [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash._baseflatten) for more details.
See the [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash._baseflatten) for more details.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc