mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
52
react-app/node_modules/lodash/internal/baseIsMatch.js
generated
vendored
Normal file
52
react-app/node_modules/lodash/internal/baseIsMatch.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
var baseIsEqual = require('./baseIsEqual'),
|
||||
toObject = require('./toObject');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isMatch` without support for callback
|
||||
* shorthands and `this` binding.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {Array} matchData The propery names, values, and compare flags to match.
|
||||
* @param {Function} [customizer] The function to customize comparing objects.
|
||||
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
||||
*/
|
||||
function baseIsMatch(object, matchData, customizer) {
|
||||
var index = matchData.length,
|
||||
length = index,
|
||||
noCustomizer = !customizer;
|
||||
|
||||
if (object == null) {
|
||||
return !length;
|
||||
}
|
||||
object = toObject(object);
|
||||
while (index--) {
|
||||
var data = matchData[index];
|
||||
if ((noCustomizer && data[2])
|
||||
? data[1] !== object[data[0]]
|
||||
: !(data[0] in object)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
data = matchData[index];
|
||||
var key = data[0],
|
||||
objValue = object[key],
|
||||
srcValue = data[1];
|
||||
|
||||
if (noCustomizer && data[2]) {
|
||||
if (objValue === undefined && !(key in object)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
var result = customizer ? customizer(objValue, srcValue, key) : undefined;
|
||||
if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = baseIsMatch;
|
Reference in New Issue
Block a user