Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/i18n / dist / cjs / node_modules / lodash / _baseMatchesProperty.js
Size: Mime:
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _baseIsEqual = require('./_baseIsEqual.js');
var _isStrictComparable = require('./_isStrictComparable.js');
var _matchesStrictComparable = require('./_matchesStrictComparable.js');
var _isKey = require('./_isKey.js');
var _toKey = require('./_toKey.js');
var get = require('./get.js');
var hasIn = require('./hasIn.js');

/** 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.default(path) && _isStrictComparable.default(srcValue)) {
    return _matchesStrictComparable.default(_toKey.default(path), srcValue);
  }
  return function(object) {
    var objValue = get.default(object, path);
    return (objValue === undefined && objValue === srcValue)
      ? hasIn.default(object, path)
      : _baseIsEqual.default(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  };
}

var _baseMatchesProperty = baseMatchesProperty;

exports.__moduleExports = _baseMatchesProperty;
exports.default = _baseMatchesProperty;
//# sourceMappingURL=_baseMatchesProperty.js.map