source: imaps-frontend/node_modules/lodash-es/isInteger.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 667 bytes
Line 
1import toInteger from './toInteger.js';
2
3/**
4 * Checks if `value` is an integer.
5 *
6 * **Note:** This method is based on
7 * [`Number.isInteger`](https://mdn.io/Number/isInteger).
8 *
9 * @static
10 * @memberOf _
11 * @since 4.0.0
12 * @category Lang
13 * @param {*} value The value to check.
14 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
15 * @example
16 *
17 * _.isInteger(3);
18 * // => true
19 *
20 * _.isInteger(Number.MIN_VALUE);
21 * // => false
22 *
23 * _.isInteger(Infinity);
24 * // => false
25 *
26 * _.isInteger('3');
27 * // => false
28 */
29function isInteger(value) {
30 return typeof value == 'number' && value == toInteger(value);
31}
32
33export default isInteger;
Note: See TracBrowser for help on using the repository browser.