source: node_modules/ramda-adjunct/es/isUinteger32.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 783 bytes
RevLine 
[d24f17c]1import { curryN } from 'ramda';
2import toUinteger32 from './toUinteger32';
3
4/**
5 * Checks whether the passed value is an unsigned 32 bit integer.
6 *
7 * @func isUinteger32
8 * @aliases isUint32
9 * @memberOf RA
10 * @since {@link https://char0n.github.io/ramda-adjunct/3.2.0|v3.2.0}
11 * @category Type
12 * @sig * -> Boolean
13 * @param {*} val The value to test
14 * @return {boolean}
15 * @see {@link RA.toUinteger32|toUinteger32}
16 * @example
17 *
18 * RA.isUinteger32(0); //=> true
19 * RA.isUinteger32(2 ** 32 - 1); //=> true
20 *
21 * RA.isUinteger32(Infinity); //=> false
22 * RA.isUinteger32(NaN); //=> false
23 * RA.isUinteger32(-1); //=> false
24 * RA.isUinteger32(2 ** 32); //=> false
25 */
26var isUinteger32 = curryN(1, function (val) {
27 return toUinteger32(val) === val;
28});
29export default isUinteger32;
Note: See TracBrowser for help on using the repository browser.