to-integer-x
ToInteger converts 'argument' to an integral numeric value.
to-integer-x.toInteger2016
⇒ number
Converts value
to an integer. (ES2016)
Kind: static property of to-integer-x
Returns: number
- Returns the converted integer.
Param | Type | Description |
---|
value | * | The value to convert. |
Example
import {toInteger2016} from 'to-integer-x';
console.log(toInteger2016(3));
console.log(toInteger2016(Number.MIN_VALUE));
console.log(toInteger2016(Infinity));
console.log(toInteger2016('3'));
to-integer-x
⇒ number
Converts value
to an integer. (ES2018)
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));
console.log(toInteger(Number.MIN_VALUE));
console.log(toInteger(Infinity));
console.log(toInteger('3'));