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