to-integer-x

4.2.2 • Public • Published

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

to-integer-x

ToInteger converts 'argument' to an integral numeric value.

module.exports(string)number

to-integer-xnumber

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

Package Sidebar

Install

npm i to-integer-x

Weekly Downloads

5,633

Version

4.2.2

License

MIT

Unpacked Size

234 kB

Total Files

11

Last publish

Collaborators

  • xotic750