@feugene/mu
Version:
Helpful TS utilities without dependencies
22 lines • 455 B
TypeScript
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @example
*
* toInteger(3.2);
* // => 3
*
* toInteger(Number.MIN_VALUE);
* // => 0
*
* toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* toInteger('3.2');
* // => 3
*/
export default function toInteger(value: any): number;
//# sourceMappingURL=toInteger.d.ts.map