Permalink
Cannot retrieve contributors at this time
33 lines (31 sloc)
669 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/lodash/isInteger.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |