source: node_modules/ramda-adjunct/lib/lensNotSatisfy.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.4 KB
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6var _lensSatisfies = _interopRequireDefault(require("./lensSatisfies"));
7function _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 */
31var lensNotSatisfy = (0, _ramda.complement)(_lensSatisfies["default"]);
32var _default = lensNotSatisfy;
33exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.