ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
35 lines (32 loc) • 868 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ramda = require("ramda");
/**
* Returns `true` if the specified object property at given path not satisfies the given predicate; false otherwise.
*
* @func
* @category Object
*
* @param {Function} predicate
* @param {String} path The path to use.
* @param {Object} obj
*
* @return {Boolean}
*
* @example
*
* const positive = x => x > 0;
*
* R_.pathNotSatisfies(positive, ['a', 'b'], { }); // true
* R_.pathNotSatisfies(positive, ['a', 'b'], { a: { b: -1 } }); // true
* R_.pathNotSatisfies(positive, ['a', 'b'], { a: { b: 3 } }); // false
*
* @sig (a -> Boolean) → String → {a} → Boolean
*
*/
var pathNotSatisfies = (0, _ramda.complement)(_ramda.pathSatisfies);
var _default = pathNotSatisfies;
exports.default = _default;