[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports["default"] = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | var _lensSatisfies = _interopRequireDefault(require("./lensSatisfies"));
|
---|
| 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 satisfy the predicate.
|
---|
| 10 | * Note that the predicate is expected to return boolean value.
|
---|
| 11 | *
|
---|
| 12 | * @func lensNotSatisfy
|
---|
| 13 | * @memberOf RA
|
---|
| 14 | * @since {@link https://char0n.github.io/ramda-adjunct/1.13.0|1.13.0}
|
---|
| 15 | * @category Relation
|
---|
| 16 | * @typedef Lens s a = Functor f => (a -> f a) -> s -> f s
|
---|
| 17 | * @sig Boolean b => (a -> b) -> Lens s a -> s -> b
|
---|
| 18 | * @see {@link RA.lensSatisfies|lensSatisfies}
|
---|
| 19 | * @param {Function} predicate The predicate function
|
---|
| 20 | * @param {Function} lens Van Laarhoven lens
|
---|
| 21 | * @param {*} data The data structure
|
---|
| 22 | * @return {boolean} `false` if the focused data structure satisfies the predicate, `true` otherwise
|
---|
| 23 | *
|
---|
| 24 | * @example
|
---|
| 25 | *
|
---|
| 26 | * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(0), [false, true, 1]); // => true
|
---|
| 27 | * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(1), [false, true, 1]); // => false
|
---|
| 28 | * RA.lensNotSatisfy(RA.isTrue, R.lensIndex(2), [false, true, 1]); // => true
|
---|
| 29 | * RA.lensNotSatisfy(R.identity, R.lensProp('x'), { x: 1 }); // => true
|
---|
| 30 | */
|
---|
| 31 | var lensNotSatisfy = (0, _ramda.complement)(_lensSatisfies["default"]);
|
---|
| 32 | var _default = lensNotSatisfy;
|
---|
| 33 | exports["default"] = _default; |
---|