Converts value to a safe integer. A safe integer can be compared and represented correctly.
_.toSafeInteger(Number.MIN_VALUE); // => 0
_.toSafeInteger(Infinity); // => 9007199254740991
- Lodash chained on (number): the converted integer.
See Implementation
Converts value to a safe integer. A safe integer can be compared and represented correctly.
_.toSafeInteger(Number.MIN_VALUE); // => 0
_.toSafeInteger(Infinity); // => 9007199254740991