source: node_modules/ramda-adjunct/es/isPositive.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: 693 bytes
Line 
1import { both, lt } from 'ramda';
2import isNumber from './isNumber';
3
4/**
5 * Checks if value is a positive `Number` primitive or object. Zero is not considered positive.
6 *
7 * @func isPositive
8 * @memberOf RA
9 * @since {@link https://char0n.github.io/ramda-adjunct/1.15.0|v1.15.0}
10 * @category Type
11 * @sig * -> Boolean
12 * @param {*} val The value to test
13 * @return {boolean}
14 * @see {@link RA.isNegative|isNegative}
15 * @example
16 *
17 * RA.isPositive(1); // => true
18 * RA.isPositive(Number.MAX_VALUE); // => true
19 * RA.isPositive(-Infinity); // => false
20 * RA.isPositive(NaN); // => false
21 * RA.isPositive('5'); // => false
22 */
23var isPositive = both(isNumber, lt(0));
24export default isPositive;
Note: See TracBrowser for help on using the repository browser.