ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
35 lines (30 loc) • 964 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ramda = require("ramda");
var _dotPathEq = _interopRequireDefault(require("./dotPathEq"));
/**
* Determines whether a dot path on an object has a specific value
* in `R_.notEqual` terms.
*
* @func
* @category Object
* @param {any} eq Value for `R_.notEqual`.
* @param {String} path The dot path to use.
* @param {Object} obj The object to retrieve the nested property from and compare with `eq`.
* @return {*} True if value on dot path equals to `eq`.
*
* @example
*
* R_.dotPathNotEq(2, 'a.b', {a: {b: 2}}); //=> false
* R_.dotPathNotEq(2, 'a.b', {c: {b: 2}}); //=> true
*
* @sig a -> String -> {a} -> Boolean
*
*/
var dotPathNotEq = (0, _ramda.complement)(_dotPathEq.default);
var _default = dotPathNotEq;
exports.default = _default;