source: node_modules/ramda-adjunct/src/isBigInt.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: 636 bytes
Line 
1import { type, pipe, identical, curryN } from 'ramda';
2
3/**
4 * Checks if value is a BigInt.
5 *
6 * @func isBigInt
7 * @memberOf RA
8 * @category Type
9 * @since {@link https://char0n.github.io/ramda-adjunct/2.27.0|v2.27.0}
10 * @sig * -> Boolean
11 * @param {*} val The value to test
12 * @return {boolean}
13 * @example
14 *
15 * RA.isBigInt(5); // => false
16 * RA.isBigInt(Number.MAX_VALUE); // => false
17 * RA.isBigInt(-Infinity); // => false
18 * RA.isBigInt(10); // => false
19 * RA.isBigInt(10n); // => true
20 * RA.isBigInt(BitInt(9007199254740991)); // => true
21 */
22const isBigInt = curryN(1, pipe(type, identical('BigInt')));
23
24export default isBigInt;
Note: See TracBrowser for help on using the repository browser.