Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / isInteger.js
1 var toInteger = require('./toInteger');
2
3 /**
4  * Checks if `value` is an integer.
5  *
6  * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger).
7  *
8  * @static
9  * @memberOf _
10  * @category Lang
11  * @param {*} value The value to check.
12  * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
13  * @example
14  *
15  * _.isInteger(3);
16  * // => true
17  *
18  * _.isInteger(Number.MIN_VALUE);
19  * // => false
20  *
21  * _.isInteger(Infinity);
22  * // => false
23  *
24  * _.isInteger('3');
25  * // => false
26  */
27 function isInteger(value) {
28   return typeof value == 'number' && value == toInteger(value);
29 }
30
31 module.exports = isInteger;