Urara-Blog/node_modules/.pnpm-store/v3/files/bf/5c53eab31ab22f0d96099168c33ca1cb8c0e2e7ffcc9db4f7fa1400a2592eb84f26ae863852eba3625863571a7b51f4aa89db09c29dfc4794efe563e1a4afc
2022-08-14 01:14:53 +08:00

20 lines
574 B
Text

/**
* 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 function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;