source: node_modules/ramda-adjunct/src/isFalsy.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: 824 bytes
Line 
1import { complement } from 'ramda';
2
3import isTruthy from './isTruthy';
4
5/**
6 * A falsy value is a value that translates to false when evaluated in a Boolean context.
7 * Falsy values are `false`, `0`, `""`, `null`, `undefined`, and `NaN`.
8 *
9 * @func isFalsy
10 * @memberOf RA
11 * @since {@link https://char0n.github.io/ramda-adjunct/2.2.0|v2.2..0}
12 * @category Type
13 * @sig * -> Boolean
14 * @param {*} val The value to test
15 * @return {boolean}
16 * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy|falsy}, {@link RA.isTruthy|isTruthy}
17 * @example
18 *
19 * RA.isFalsy(false); // => true
20 * RA.isFalsy(0); // => true
21 * RA.isFalsy(''); // => true
22 * RA.isFalsy(null); // => true
23 * RA.isFalsy(undefined); // => true
24 * RA.isFalsy(NaN); // => true
25 */
26const isFalsy = complement(isTruthy);
27
28export default isFalsy;
Note: See TracBrowser for help on using the repository browser.