Sha256: e00eeda36ba81142678dbaee81d5b122087988eedb0e80768d7a4ee379605e2a
Contents?: true
Size: 687 Bytes
Versions: 14
Compression:
Stored size: 687 Bytes
Contents
var baseIsEqual = require('./baseIsEqual'), isStrictComparable = require('./isStrictComparable'); /** * The base implementation of `_.matchesProperty` which does not coerce `key` * to a string. * * @private * @param {string} key The key of the property to get. * @param {*} value The value to compare. * @returns {Function} Returns the new function. */ function baseMatchesProperty(key, value) { if (isStrictComparable(value)) { return function(object) { return object != null && object[key] === value; }; } return function(object) { return object != null && baseIsEqual(value, object[key], null, true); }; } module.exports = baseMatchesProperty;
Version data entries
14 entries across 7 versions & 1 rubygems