Urara-Blog/node_modules/.pnpm-store/v3/files/98/9408a649e9a2a8cc4afa5962f192a18fcf3e40563c7b508894d568f3d830249046e1aa27220a133eb05474139bcc05949abc304724b95b4921987d97e5909f
2022-08-14 01:14:53 +08:00

33 lines
669 B
Text

var toInteger = require('./toInteger');
/**
* Checks if `value` is an integer.
*
* **Note:** This method is based on
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
* @example
*
* _.isInteger(3);
* // => true
*
* _.isInteger(Number.MIN_VALUE);
* // => false
*
* _.isInteger(Infinity);
* // => false
*
* _.isInteger('3');
* // => false
*/
function isInteger(value) {
return typeof value == 'number' && value == toInteger(value);
}
module.exports = isInteger;