source: node_modules/ramda-adjunct/src/lensNotEq.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: 956 bytes
RevLine 
[d24f17c]1import { complement } from 'ramda';
2
3import lensEq from './lensEq';
4
5/**
6 * Returns `true` if data structure focused by the given lens doesn't equal provided value.
7 *
8 * @func lensNotEq
9 * @memberOf RA
10 * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
11 * @category Relation
12 * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
13 * @sig Lens s a -> b -> s -> Boolean
14 * @see {@link RA.lensEq|lensEq}
15 * @param {function} lens Van Laarhoven lens
16 * @param {*} value The value to compare the focused data structure with
17 * @param {*} data The data structure
18 * @return {boolean} `false` if the focused data structure equals value, `true` otherwise
19 *
20 * @example
21 *
22 * RA.lensNotEq(R.lensIndex(0), 1, [0, 1, 2]); // => true
23 * RA.lensNotEq(R.lensIndex(1), 1, [0, 1, 2]); // => false
24 * RA.lensNotEq(R.lensPath(['a', 'b']), 'foo', { a: { b: 'foo' } }) // => false
25 */
26const lensNotEq = complement(lensEq);
27
28export default lensNotEq;
Note: See TracBrowser for help on using the repository browser.