MCPcopy
hub / github.com/lodash/lodash / matchesStrictComparable

Function matchesStrictComparable

lodash.js:6501–6509  ·  view source on GitHub ↗

* A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec

(key, srcValue)

Source from the content-addressed store, hash-verified

6499 * @returns {Function} Returns the new spec function.
6500 */
6501 function matchesStrictComparable(key, srcValue) {
6502 return function(object) {
6503 if (object == null) {
6504 return false;
6505 }
6506 return object[key] === srcValue &&
6507 (srcValue !== undefined || (key in Object(object)));
6508 };
6509 }
6510
6511 /**
6512 * A specialized version of `_.memoize` which clears the memoized function's

Callers 2

baseMatchesFunction · 0.85
baseMatchesPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected