mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
33
node_modules/lodash/_baseMatchesProperty.js
generated
vendored
Normal file
33
node_modules/lodash/_baseMatchesProperty.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var baseIsEqual = require('./_baseIsEqual'),
|
||||
get = require('./get'),
|
||||
hasIn = require('./hasIn'),
|
||||
isKey = require('./_isKey'),
|
||||
isStrictComparable = require('./_isStrictComparable'),
|
||||
matchesStrictComparable = require('./_matchesStrictComparable'),
|
||||
toKey = require('./_toKey');
|
||||
|
||||
/** Used to compose bitmasks for value comparisons. */
|
||||
var COMPARE_PARTIAL_FLAG = 1,
|
||||
COMPARE_UNORDERED_FLAG = 2;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} path The path of the property to get.
|
||||
* @param {*} srcValue The value to match.
|
||||
* @returns {Function} Returns the new spec function.
|
||||
*/
|
||||
function baseMatchesProperty(path, srcValue) {
|
||||
if (isKey(path) && isStrictComparable(srcValue)) {
|
||||
return matchesStrictComparable(toKey(path), srcValue);
|
||||
}
|
||||
return function(object) {
|
||||
var objValue = get(object, path);
|
||||
return (objValue === undefined && objValue === srcValue)
|
||||
? hasIn(object, path)
|
||||
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = baseMatchesProperty;
|
Loading…
Add table
Add a link
Reference in a new issue