lodash.merge
Advanced tools
Comparing version 3.2.1 to 3.3.0
69
index.js
/** | ||
* lodash 3.2.1 (Custom Build) <https://lodash.com/> | ||
* lodash 3.3.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
@@ -12,5 +12,5 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
createAssigner = require('lodash._createassigner'), | ||
getNative = require('lodash._getnative'), | ||
isArguments = require('lodash.isarguments'), | ||
isArray = require('lodash.isarray'), | ||
isNative = require('lodash.isnative'), | ||
isPlainObject = require('lodash.isplainobject'), | ||
@@ -33,9 +33,2 @@ isTypedArray = require('lodash.istypedarray'), | ||
/** Used for native method references. */ | ||
var arrayProto = Array.prototype; | ||
/** Native method references. */ | ||
var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols, | ||
push = arrayProto.push; | ||
/** | ||
@@ -45,3 +38,3 @@ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) | ||
*/ | ||
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; | ||
var MAX_SAFE_INTEGER = 9007199254740991; | ||
@@ -64,7 +57,5 @@ /** | ||
} | ||
var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)); | ||
if (!isSrcArr) { | ||
var props = keys(source); | ||
push.apply(props, getSymbols(source)); | ||
} | ||
var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), | ||
props = isSrcArr ? null : keys(source); | ||
arrayEach(props || source, function(srcValue, key) { | ||
@@ -88,3 +79,3 @@ if (props) { | ||
} | ||
if ((isSrcArr || result !== undefined) && | ||
if ((result !== undefined || (isSrcArr && !(key in object))) && | ||
(isCommon || (result === result ? (result !== value) : (value === value)))) { | ||
@@ -182,13 +173,2 @@ object[key] = result; | ||
/** | ||
* Creates an array of the own symbols of `object`. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {Array} Returns the array of symbols. | ||
*/ | ||
var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) { | ||
return getOwnPropertySymbols(toObject(object)); | ||
}; | ||
/** | ||
* Checks if `value` is array-like. | ||
@@ -218,13 +198,2 @@ * | ||
/** | ||
* Converts `value` to an object if it is not one. | ||
* | ||
* @private | ||
* @param {*} value The value to process. | ||
* @returns {Object} Returns the object. | ||
*/ | ||
function toObject(value) { | ||
return isObject(value) ? value : Object(value); | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
@@ -253,3 +222,3 @@ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
var type = typeof value; | ||
return type == 'function' || (!!value && type == 'object'); | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
@@ -307,24 +276,2 @@ | ||
/** | ||
* Creates a function that returns `value`. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Utility | ||
* @param {*} value The value to return from the new function. | ||
* @returns {Function} Returns the new function. | ||
* @example | ||
* | ||
* var object = { 'user': 'fred' }; | ||
* var getter = _.constant(object); | ||
* | ||
* getter() === object; | ||
* // => true | ||
*/ | ||
function constant(value) { | ||
return function() { | ||
return value; | ||
}; | ||
} | ||
module.exports = merge; |
{ | ||
"name": "lodash.merge", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "The modern build of lodash’s `_.merge` as a module.", | ||
@@ -23,5 +23,5 @@ "homepage": "https://lodash.com/", | ||
"lodash._createassigner": "^3.0.0", | ||
"lodash._getnative": "^3.0.0", | ||
"lodash.isarguments": "^3.0.0", | ||
"lodash.isarray": "^3.0.0", | ||
"lodash.isnative": "^3.0.0", | ||
"lodash.isplainobject": "^3.0.0", | ||
@@ -28,0 +28,0 @@ "lodash.istypedarray": "^3.0.0", |
@@ -1,2 +0,2 @@ | ||
# lodash.merge v3.2.1 | ||
# lodash.merge v3.3.0 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.merge` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.2.1-npm-packages/lodash.merge) for more details. | ||
See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/3.3.0-npm-packages/lodash.merge) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11726
252
+ Addedlodash._getnative@^3.0.0
- Removedlodash.isnative@^3.0.0
- Removedlodash.isnative@3.0.7(transitive)