lodash.isequal
Advanced tools
Comparing version 3.0.3 to 3.0.4
49
index.js
/** | ||
* lodash 3.0.3 (Custom Build) <https://lodash.com/> | ||
* lodash 3.0.4 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
@@ -13,14 +13,2 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
/** | ||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` if suitable for strict | ||
* equality comparisons, else `false`. | ||
*/ | ||
function isStrictComparable(value) { | ||
return value === value && !isObject(value); | ||
} | ||
/** | ||
* Performs a deep comparison between two values to determine if they are | ||
@@ -40,2 +28,3 @@ * equivalent. If `customizer` is provided it is invoked to compare values. | ||
* @memberOf _ | ||
* @alias eq | ||
* @category Lang | ||
@@ -70,37 +59,7 @@ * @param {*} value The value to compare. | ||
function isEqual(value, other, customizer, thisArg) { | ||
customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 3); | ||
if (!customizer && isStrictComparable(value) && isStrictComparable(other)) { | ||
return value === other; | ||
} | ||
customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; | ||
var result = customizer ? customizer(value, other) : undefined; | ||
return result === undefined ? baseIsEqual(value, other, customizer) : !!result; | ||
return result === undefined ? baseIsEqual(value, other, customizer) : !!result; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(1); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
return type == 'function' || (!!value && type == 'object'); | ||
} | ||
module.exports = isEqual; |
{ | ||
"name": "lodash.isequal", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "The modern build of lodash’s `_.isEqual` as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.isequal v3.0.3 | ||
# lodash.isequal v3.0.4 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isEqual` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isequal) for more details. | ||
See the [documentation](https://lodash.com/docs#isEqual) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isequal) 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
5152
60