lodash._basematches
Advanced tools
+2
-51
| /** | ||
| * lodash 3.1.0 (Custom Build) <https://lodash.com/> | ||
| * lodash 3.1.1 (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'), | ||
| keys = require('lodash.keys'); | ||
@@ -20,51 +20,2 @@ | ||
| /** | ||
| * 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; | ||
| } | ||
| /** | ||
| * The base implementation of `_.matches` which supports specifying whether | ||
@@ -71,0 +22,0 @@ * `source` should be cloned. |
+2
-2
| { | ||
| "name": "lodash._basematches", | ||
| "version": "3.1.0", | ||
| "version": "3.1.1", | ||
| "description": "The modern build of lodash’s internal `baseMatches` as a module.", | ||
@@ -19,5 +19,5 @@ "homepage": "https://lodash.com/", | ||
| "dependencies": { | ||
| "lodash._baseisequal": "^3.0.0", | ||
| "lodash._baseismatch": "^3.0.0", | ||
| "lodash.keys": "^3.0.0" | ||
| } | ||
| } |
+2
-2
@@ -1,2 +0,2 @@ | ||
| # lodash._basematches v3.1.0 | ||
| # lodash._basematches v3.1.1 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseMatches` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
| See the [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash._basematches) for more details. | ||
| See the [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash._basematches) for more details. |
5481
-21.36%85
-35.11%+ Added
+ Added
- Removed