source: node_modules/ramda-adjunct/lib/propNotEq.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _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 */
31var propNotEq = (0, _ramda.complement)(_ramda.propEq);
32var _default = propNotEq;
33exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.