ToInteger converts 'argument' to an integral numeric value.
npm install to-integer-x href="https://travis-ci.org/Xotic750/to-integer-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/to-integer-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/to-integer-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/to-integer-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/to-integer-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/to-integer-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/to-integer-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/to-integer-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
ToInteger converts 'argument' to an integral numeric value.
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
``js
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
``