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

lodash.clonedeep

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.clonedeep - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

55

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

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

var Stack = require('lodash._stack'),
arrayEach = require('lodash._arrayeach'),
baseFor = require('lodash._basefor'),

@@ -97,2 +96,23 @@ isBuffer = require('lodash.isbuffer'),

/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
/**
* A specialized version of `_.reduce` for arrays without support for

@@ -198,3 +218,4 @@ * iteratee shorthands.

Uint8Array = root.Uint8Array,
getOwnPropertySymbols = Object.getOwnPropertySymbols;
getOwnPropertySymbols = Object.getOwnPropertySymbols,
objectCreate = Object.create;

@@ -321,13 +342,5 @@ /* Built-in method references that are verified to be native. */

*/
var baseCreate = (function() {
function object() {}
return function(prototype) {
if (isObject(prototype)) {
object.prototype = prototype;
var result = new object;
object.prototype = undefined;
}
return result || {};
};
}());
function baseCreate(proto) {
return isObject(proto) ? objectCreate(proto) : {};
}

@@ -440,6 +453,7 @@ /**

function cloneTypedArray(typedArray, isDeep) {
var buffer = typedArray.buffer,
var arrayBuffer = typedArray.buffer,
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
Ctor = typedArray.constructor;
return new Ctor(isDeep ? cloneArrayBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
}

@@ -497,5 +511,8 @@

while (++index < length) {
var key = props[index],
newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: source[key];
assignValue(object, key, newValue);

@@ -725,3 +742,3 @@ }

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

@@ -728,0 +745,0 @@ * @param {*} value The value to check.

{
"name": "lodash.clonedeep",
"version": "4.1.1",
"version": "4.2.0",
"description": "The lodash method `_.cloneDeep` exported as a module.",

@@ -18,3 +18,2 @@ "homepage": "https://lodash.com/",

"dependencies": {
"lodash._arrayeach": "^3.0.0",
"lodash._basefor": "^3.0.0",

@@ -21,0 +20,0 @@ "lodash._root": "^3.0.0",

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

# lodash.clonedeep v4.1.1
# lodash.clonedeep v4.2.0

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

See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.clonedeep) for more details.
See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.clonedeep) for more details.
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