1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | var _lensEq = _interopRequireDefault(require("./lensEq"));
|
---|
7 | function _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 | */
|
---|
29 | var lensNotEq = (0, _ramda.complement)(_lensEq["default"]);
|
---|
30 | var _default = lensNotEq;
|
---|
31 | exports["default"] = _default; |
---|