ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## isInteger + [link](./isInteger "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9867 "View in source.") + [npm](https://www.npmjs.com/package/lodash.isinteger "See the npm package.") ``` _.isInteger(value) ``` 检查 `value` 是否是整数。 **注意:** 这个方法基于 [`Number.isInteger`](https://mdn.io/Number/isInteger). ### 参数 1. value (\*) 要检查的值 ### 返回值 (boolean) 如果是整数返回 `true`,否则返回 `false` ### 示例 ``` _.isInteger(3); // => true _.isInteger(Number.MIN_VALUE); // => false _.isInteger(Infinity); // => false _.isInteger('3'); // => false ```