isInteger source npm

_.isInteger(value)

Checks if value is an integer.

Note: This method is based on Number.isInteger.

Arguments

  1. 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