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