_.isInteger(value)

sourcenpm package

Checks if value is an integer.Note: This method is based on Number.isInteger.

Since

4.0.0

Arguments

  • value (*): The value to check.

Returns

(boolean): Returns true if value is an integer, else false.

Example

  1. _.isInteger(3);
    // => true
    _.isInteger(Number.MIN_VALUE);
    // => false
    _.isInteger(Infinity);
    // => false
    _.isInteger('3');
    // => false