Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

fabiospampinato/is-numeric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Checks if a variable represents a numeric value.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published