is-integeric
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

is-integeric

npm npm bundle size CircleCI NPM Badges

Lightweight, simple test to see if an input is an integer or can be converted to one.

import isIntegeric from 'is-integeric';

console.log(isIntegeric(5));      // true
console.log(isIntegeric('5'));    // true
console.log(isIntegeric('5.5'));  // true, because it can be floored
console.log(isIntegeric('five')); // false

Readme

Keywords

none

Package Sidebar

Install

npm i is-integeric

Weekly Downloads

10

Version

0.2.5

License

MIT

Unpacked Size

7.35 kB

Total Files

13

Last publish

Collaborators

  • tdukart