ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
37 lines (32 loc) • 1.03 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ramda = require("ramda");
var _dotPathSatisfies = _interopRequireDefault(require("./dotPathSatisfies"));
/**
* Returns `true` if the specified object property at given dot path not satisfies the given predicate; false otherwise.
*
* @func
* @category Object
*
* @param {Function} predicate
* @param {String} path The dot path to use.
* @param {Object} obj
*
* @return {Boolean}
*
* @example
*
* R_.dotPathNotSatisfies((y) => y > 0, 'a.b', { a: { b: 1 } }); // false
* R_.dotPathNotSatisfies((y) => y > 0, 'a.b', { a: { b: -1 } }); // true
* R_.dotPathNotSatisfies((y) => y > 0, 'a.b', { a: { c: 1 } }); // true
*
* @sig (a -> Boolean) → String → {a} → Boolean
*
*/
var dotPathNotSatisfies = (0, _ramda.complement)(_dotPathSatisfies.default);
var _default = dotPathNotSatisfies;
exports.default = _default;