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