CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
isInteger.js34 linesDownload Raw Back to lodash-es
1import toInteger from './toInteger.js';2 3/**4 * Checks if `value` is an integer.5 *6 * **Note:** This method is based on7 * [`Number.isInteger`](https://mdn.io/Number/isInteger).8 *9 * @static10 * @memberOf _11 * @since 4.0.012 * @category Lang13 * @param {*} value The value to check.14 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.15 * @example16 *17 * _.isInteger(3);18 * // => true19 *20 * _.isInteger(Number.MIN_VALUE);21 * // => false22 *23 * _.isInteger(Infinity);24 * // => false25 *26 * _.isInteger('3');27 * // => false28 */29function isInteger(value) {30  return typeof value == 'number' && value == toInteger(value);31}32 33export default isInteger;34 
basant307/AI_Governance_Project · CoolFace