Socket
Socket
Sign inDemoInstall

lodash.mergewith

Package Overview
Dependencies
9
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.1.1

66

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

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

baseFor = require('lodash._basefor'),
isBuffer = require('lodash.isbuffer'),
isPlainObject = require('lodash.isplainobject'),

@@ -239,7 +240,9 @@ keys = require('lodash.keys'),

var Map = getNative(root, 'Map'),
Set = getNative(root, 'Set');
Set = getNative(root, 'Set'),
WeakMap = getNative(root, 'WeakMap');
/** Used to detect maps and sets. */
/** Used to detect maps, sets, and weakmaps. */
var mapCtorString = Map ? funcToString.call(Map) : '',
setCtorString = Set ? funcToString.call(Set) : '';
setCtorString = Set ? funcToString.call(Set) : '',
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';

@@ -331,2 +334,5 @@ /** Used to convert symbols to primitives and strings. */

if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {

@@ -506,14 +512,33 @@ if (isHostObject(value)) {

/**
* Creates a clone of `buffer`.
* Creates a clone of `buffer`.
*
* @private
* @param {ArrayBuffer} buffer The array buffer to clone.
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var Ctor = buffer.constructor,
result = new Ctor(buffer.length);
buffer.copy(result);
return result;
}
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneBuffer(buffer) {
var Ctor = buffer.constructor,
result = new Ctor(buffer.byteLength),
function cloneArrayBuffer(arrayBuffer) {
var Ctor = arrayBuffer.constructor,
result = new Ctor(arrayBuffer.byteLength),
view = new Uint8Array(result);
view.set(new Uint8Array(buffer));
view.set(new Uint8Array(arrayBuffer));
return result;

@@ -584,3 +609,3 @@ }

return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
return new Ctor(isDeep ? cloneArrayBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
}

@@ -735,4 +760,6 @@

// Fallback for IE 11 providing `toStringTag` values for maps and sets.
if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) {
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
if ((Map && getTag(new Map) != mapTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {

@@ -744,8 +771,7 @@ var result = objectToString.call(value),

if (ctorString) {
if (ctorString == mapCtorString) {
return mapTag;
switch (ctorString) {
case mapCtorString: return mapTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
if (ctorString == setCtorString) {
return setTag;
}
}

@@ -806,3 +832,3 @@ return result;

case arrayBufferTag:
return cloneBuffer(object);
return cloneArrayBuffer(object);

@@ -837,3 +863,3 @@ case boolTag:

/**
* Checks if the provided arguments are from an iteratee call.
* Checks if the given arguments are from an iteratee call.
*

@@ -840,0 +866,0 @@ * @private

{
"name": "lodash.mergewith",
"version": "4.1.0",
"version": "4.1.1",
"description": "The lodash method `_.mergeWith` exported as a module.",

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

"lodash._stack": "^4.0.0",
"lodash.isbuffer": "^4.0.0",
"lodash.isplainobject": "^4.0.0",

@@ -24,0 +25,0 @@ "lodash.keys": "^4.0.0",

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

# lodash.mergewith v4.1.0
# lodash.mergewith v4.1.1

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc