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.0 KB
|
Line | |
---|
1 | var _complement =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_complement.js");
|
---|
4 |
|
---|
5 | var _curry2 =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./internal/_curry2.js");
|
---|
8 |
|
---|
9 | var all =
|
---|
10 | /*#__PURE__*/
|
---|
11 | require("./all.js");
|
---|
12 | /**
|
---|
13 | * Returns `true` if no elements of the list match the predicate, `false`
|
---|
14 | * otherwise.
|
---|
15 | *
|
---|
16 | * Dispatches to the `all` method of the second argument, if present.
|
---|
17 | *
|
---|
18 | * Acts as a transducer if a transformer is given in list position.
|
---|
19 | *
|
---|
20 | * @func
|
---|
21 | * @memberOf R
|
---|
22 | * @since v0.12.0
|
---|
23 | * @category List
|
---|
24 | * @sig (a -> Boolean) -> [a] -> Boolean
|
---|
25 | * @param {Function} fn The predicate function.
|
---|
26 | * @param {Array} list The array to consider.
|
---|
27 | * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise.
|
---|
28 | * @see R.all, R.any
|
---|
29 | * @example
|
---|
30 | *
|
---|
31 | * const isEven = n => n % 2 === 0;
|
---|
32 | * const isOdd = n => n % 2 !== 0;
|
---|
33 | *
|
---|
34 | * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true
|
---|
35 | * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false
|
---|
36 | */
|
---|
37 |
|
---|
38 |
|
---|
39 | var none =
|
---|
40 | /*#__PURE__*/
|
---|
41 | _curry2(function none(fn, input) {
|
---|
42 | return all(_complement(fn), input);
|
---|
43 | });
|
---|
44 |
|
---|
45 | module.exports = none; |
---|
Note:
See
TracBrowser
for help on using the repository browser.