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:
735 bytes
|
Line | |
---|
1 | import { and, complement } from 'ramda';
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Returns false if both arguments are truthy; true otherwise.
|
---|
5 | *
|
---|
6 | * @func nand
|
---|
7 | * @memberOf RA
|
---|
8 | * @since {@link https://char0n.github.io/ramda-adjunct/2.19.0|v2.19.0}
|
---|
9 | * @category Logic
|
---|
10 | * @sig a -> b -> Boolean
|
---|
11 | * @param {*} a
|
---|
12 | * @param {*} b
|
---|
13 | * @return {Boolean} false if both arguments are truesy
|
---|
14 | * @example
|
---|
15 | *
|
---|
16 | * RA.nand(true, true); //=> false
|
---|
17 | * RA.nand(false, true); //=> true
|
---|
18 | * RA.nand(true, false); //=> true
|
---|
19 | * RA.nand(false, false); //=> true
|
---|
20 | * RA.nand(1.0, 1.0); //=> false
|
---|
21 | * RA.nand(1.0, 0); //=> true
|
---|
22 | * RA.nand(0, 1.0); //=> true
|
---|
23 | * RA.nand(0, 0); //=> true
|
---|
24 | */
|
---|
25 | const nand = complement(and); // eslint-disable-line ramda/complement-simplification
|
---|
26 |
|
---|
27 | export default nand;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.