You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
439 B
17 lines
439 B
import isNil from './is-nil';
|
|
import keys from './keys';
|
|
function isMatch(obj, attrs) {
|
|
var _keys = keys(attrs);
|
|
var length = _keys.length;
|
|
if (isNil(obj))
|
|
return !length;
|
|
for (var i = 0; i < length; i += 1) {
|
|
var key = _keys[i];
|
|
if (attrs[key] !== obj[key] || !(key in obj)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
export default isMatch;
|
|
//# sourceMappingURL=is-match.js.map
|