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.1 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | /**
|
---|
7 | * Takes a list of predicates and returns a predicate that returns true for a given list of
|
---|
8 | * arguments if one or more of the provided predicates is not satisfied by those arguments. It is
|
---|
9 | * the complement of Ramda's allPass.
|
---|
10 | *
|
---|
11 | * The function returned is a curried function whose arity matches that of the
|
---|
12 | * highest-arity predicate.
|
---|
13 | *
|
---|
14 | * @func notAllPass
|
---|
15 | * @memberOf RA
|
---|
16 | * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
|
---|
17 | * @category Logic
|
---|
18 | * @sig [(*... -> Boolean)] -> (*... -> Boolean)
|
---|
19 | * @param {Array} predicates An array of predicates to check
|
---|
20 | * @return {Function} The combined predicate
|
---|
21 | * @see {@link http://ramdajs.com/docs/#allPass|R.allPass}
|
---|
22 | * @example
|
---|
23 | *
|
---|
24 | * const gt10 = R.gt(R.__, 10)
|
---|
25 | * const even = (x) => x % 2 === 0;
|
---|
26 | * const f = RA.notAllPass([gt10, even]);
|
---|
27 | *
|
---|
28 | * f(12); //=> false
|
---|
29 | * f(8); //=> true
|
---|
30 | * f(11); //=> true
|
---|
31 | * f(9); //=> true
|
---|
32 | */
|
---|
33 | var notAllPass = (0, _ramda.curry)((0, _ramda.compose)(_ramda.complement, _ramda.allPass));
|
---|
34 | var _default = notAllPass;
|
---|
35 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.