Converts value to an integer.
value
Note: This function is loosely based on ToInteger.
ToInteger
The value to convert.
Returns the converted integer.
_.toInteger(3);// => 3_.toInteger(Number.MIN_VALUE);// => 0_.toInteger(Infinity);// => 1.7976931348623157e+308_.toInteger('3');// => 3 Copy
_.toInteger(3);// => 3_.toInteger(Number.MIN_VALUE);// => 0_.toInteger(Infinity);// => 1.7976931348623157e+308_.toInteger('3');// => 3
Converts
value
to an integer.Note: This function is loosely based on
ToInteger
.