[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | /* eslint-disable max-len */
|
---|
| 7 | /**
|
---|
| 8 | * Determines whether a nested path on an object doesn't have a specific value,
|
---|
| 9 | * in R.equals terms. Most likely used to filter a list.
|
---|
| 10 | *
|
---|
| 11 | * @func pathNotEq
|
---|
| 12 | * @memberOf RA
|
---|
| 13 | * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
|
---|
| 14 | * @category Relation
|
---|
| 15 | * @sig a => [Idx] => {a} => Boolean
|
---|
| 16 | * @sig Idx = String | Int | Symbol
|
---|
| 17 | * @param {a} val The value to compare the nested property with
|
---|
| 18 | * @param {Array} path The path of the nested property to use
|
---|
| 19 | * @param {Object} object The object to check the nested property in
|
---|
| 20 | * @return {boolean} Returns Boolean `false` if the value equals the nested object property, `true` otherwise
|
---|
| 21 | * @see {@link http://ramdajs.com/docs/#pathEq|R.pathEq}
|
---|
| 22 | * @example
|
---|
| 23 | *
|
---|
| 24 | * const user1 = { address: { zipCode: 90210 } };
|
---|
| 25 | * const user2 = { address: { zipCode: 55555 } };
|
---|
| 26 | * const user3 = { name: 'Bob' };
|
---|
| 27 | * const users = [ user1, user2, user3 ];
|
---|
| 28 | * const isFamous = RA.pathNotEq(90210, ['address', 'zipCode']);
|
---|
| 29 | * R.filter(isFamous, users); //=> [ user2, user3 ]
|
---|
| 30 | */
|
---|
| 31 | /* eslint-enable max-len */
|
---|
| 32 | var pathNotEq = (0, _ramda.complement)(_ramda.pathEq);
|
---|
| 33 | var _default = pathNotEq;
|
---|
| 34 | exports["default"] = _default; |
---|