[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | /**
|
---|
| 7 | * Returns true if the specified object property is not equal,
|
---|
| 8 | * in R.equals terms, to the given value; false otherwise.
|
---|
| 9 | *
|
---|
| 10 | * @func propNotEq
|
---|
| 11 | * @memberOf RA
|
---|
| 12 | * @since {@link https://char0n.github.io/ramda-adjunct/2.3.0|v2.3.0}
|
---|
| 13 | * @category Relation
|
---|
| 14 | * @sig a -> String -> Object -> Boolean
|
---|
| 15 | * @param {a} val The value to compare to
|
---|
| 16 | * @param {String} name The property to pick
|
---|
| 17 | * @param {Object} object The object, that presumably contains value under the property
|
---|
| 18 | * @return {boolean} Comparison result
|
---|
| 19 | * @see {@link http://ramdajs.com/docs/#propEq|R.propEq}
|
---|
| 20 | * @example
|
---|
| 21 | *
|
---|
| 22 | * const abby = { name: 'Abby', age: 7, hair: 'blond' };
|
---|
| 23 | * const fred = { name: 'Fred', age: 12, hair: 'brown' };
|
---|
| 24 | * const rusty = { name: 'Rusty', age: 10, hair: 'brown' };
|
---|
| 25 | * const alois = { name: 'Alois', age: 15, disposition: 'surly' };
|
---|
| 26 | * const kids = [abby, fred, rusty, alois];
|
---|
| 27 | * const hasNotBrownHair = RA.propNotEq('brown', 'hair');
|
---|
| 28 | *
|
---|
| 29 | * R.filter(hasNotBrownHair, kids); //=> [abby, alois]
|
---|
| 30 | */
|
---|
| 31 | var propNotEq = (0, _ramda.complement)(_ramda.propEq);
|
---|
| 32 | var _default = propNotEq;
|
---|
| 33 | exports["default"] = _default; |
---|