@fabiospampinato/is-numeric
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

isNumeric

Checks if a variable represents a numeric value.

Install

npm install --save @fabiospampinato/is-numeric

Usage

import isNumeric from '@fabiospampinato/is-numeric';

isNumeric ( 3 ); // true
isNumeric ( '3' ); // true
isNumeric ( 2e+30 ); // true
isNumeric ( '2e30' ); // true

isNumeric ( Infinity ); // false
isNumeric ( NaN ); // false
isNumeric ( '__test__' ); // false
isNumeric ( '123test' ); // false

License

MIT © Fabio Spampinato

Readme

Keywords

Package Sidebar

Install

npm i @fabiospampinato/is-numeric

Weekly Downloads

3

Version

2.0.0

License

none

Unpacked Size

3.32 kB

Total Files

9

Last publish

Collaborators

  • fabiospampinato