ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
35 lines (32 loc) • 833 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 prop not satisfies the given predicate; false otherwise.
*
* @func
* @category Object
*
* @param {Function} predicate
* @param {String} prop The prop to use.
* @param {Object} obj
*
* @return {Boolean}
*
* @example
*
* const positive = x => x > 0;
*
* R_.propNotSatisfies(positive, 'a', { }); // true
* R_.propNotSatisfies(positive, 'a', { a: -1 }); // true
* R_.propNotSatisfies(positive, 'a', { a: 3 }); // false
*
* @sig (a -> Boolean) → String → {a} → Boolean
*
*/
var propNotSatisfies = (0, _ramda.complement)(_ramda.propSatisfies);
var _default = propNotSatisfies;
exports.default = _default;