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