Package Exports
- to-integer-x
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (to-integer-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
to-integer-x
ToInteger converts 'argument' to an integral numeric value.
module.exports(string) ⇒ number ⏏
to-integer-x ⇒ number
Converts value to an integer. (ES2019)
Kind: static property of to-integer-x
Returns: number - Returns the converted integer.
| Param | Type | Description |
|---|---|---|
| value | * |
The value to convert. |
Example
import toInteger from 'to-integer-x';
console.log(toInteger(3)); // 3
console.log(toInteger(Number.MIN_VALUE)); // 0
console.log(toInteger(Infinity)); // 1.7976931348623157e+308
console.log(toInteger('3')); // 3