_.isSafeInteger(value)
Checks if value
is a safe integer. An integer is safe if it's an IEEE-754 double precision number which isn't the result of a rounded unsafe integer.Note: This method is based on Number.isSafeInteger
.
Since
4.0.0
Arguments
value
(*): The value to check.
Returns
(boolean): Returns true
if value
is a safe integer, else false
.
Example
_.isSafeInteger(3);// => true_.isSafeInteger(Number.MIN_VALUE);// => false_.isSafeInteger(Infinity);// => false_.isSafeInteger('3');// => false
当前内容版权归 lodash.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 lodash.com .