JSPM

  • Created
  • Published
  • Downloads 10899
  • Score
    100M100P100Q131330F
  • License MIT

ToInteger converts 'argument' to an integral numeric value.

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

Travis status Dependency status devDependency status npm version

ES6-compliant shim for toInteger.

Requires ES3 or above.

See: 7.1.4 ToInteger ( argument )
Version: 1.3.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exports(value)number

Converts value to an integer.

Kind: Exported function
Returns: number - Returns the converted integer.

Param Type Description
value * The value to convert.

Example

var toInteger = require('to-integer-x');
toInteger(3); // 3
toInteger(Number.MIN_VALUE); // 0
toInteger(Infinity); // 1.7976931348623157e+308
toInteger('3'); // 3