lodash.ismatch
Advanced tools
Comparing version 3.0.0 to 3.1.0
53
index.js
/** | ||
* lodash 3.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 3.1.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
@@ -9,3 +9,3 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
*/ | ||
var baseIsEqual = require('lodash._baseisequal'), | ||
var baseIsMatch = require('lodash._baseismatch'), | ||
bindCallback = require('lodash._bindcallback'), | ||
@@ -21,51 +21,2 @@ keys = require('lodash.keys'); | ||
/** | ||
* The base implementation of `_.isMatch` without support for callback | ||
* shorthands or `this` binding. | ||
* | ||
* @private | ||
* @param {Object} source The object to inspect. | ||
* @param {Array} props The source property names to match. | ||
* @param {Array} values The source values to match. | ||
* @param {Array} strictCompareFlags Strict comparison flags for source values. | ||
* @param {Function} [customizer] The function to customize comparing objects. | ||
* @returns {boolean} Returns `true` if `object` is a match, else `false`. | ||
*/ | ||
function baseIsMatch(object, props, values, strictCompareFlags, customizer) { | ||
var length = props.length; | ||
if (object == null) { | ||
return !length; | ||
} | ||
var index = -1, | ||
noCustomizer = !customizer; | ||
while (++index < length) { | ||
if ((noCustomizer && strictCompareFlags[index]) | ||
? values[index] !== object[props[index]] | ||
: !hasOwnProperty.call(object, props[index]) | ||
) { | ||
return false; | ||
} | ||
} | ||
index = -1; | ||
while (++index < length) { | ||
var key = props[index]; | ||
if (noCustomizer && strictCompareFlags[index]) { | ||
var result = hasOwnProperty.call(object, key); | ||
} else { | ||
var objValue = object[key], | ||
srcValue = values[index]; | ||
result = customizer ? customizer(objValue, srcValue, key) : undefined; | ||
if (typeof result == 'undefined') { | ||
result = baseIsEqual(srcValue, objValue, customizer, true); | ||
} | ||
} | ||
if (!result) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
/** | ||
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`. | ||
@@ -72,0 +23,0 @@ * |
{ | ||
"name": "lodash.ismatch", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "The modern build of lodash’s `_.isMatch` as a module.", | ||
@@ -20,3 +20,3 @@ "homepage": "https://lodash.com/", | ||
"dependencies": { | ||
"lodash._baseisequal": "^3.0.0", | ||
"lodash._baseismatch": "^3.0.0", | ||
"lodash._bindcallback": "^3.0.0", | ||
@@ -23,0 +23,0 @@ "lodash.keys": "^3.0.0" |
@@ -1,2 +0,2 @@ | ||
# lodash.ismatch v3.0.0 | ||
# lodash.ismatch v3.1.0 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isMatch` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.ismatch) for more details. | ||
See the [documentation](https://lodash.com/docs#isMatch) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.ismatch) 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
6925
113
+ Addedlodash._baseismatch@^3.0.0
+ Addedlodash._baseismatch@3.1.3(transitive)
- Removedlodash._baseisequal@^3.0.0