1.0.0 • Published 7 years ago

string-is-numeric v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

string-is-numeric

Check whether or not a string is numeric.

Installation

npm install --save string-is-numeric

Usage

const stringIsNumeric = require('string-is-numeric')

stringIsNumeric('') // false
stringIsNumeric('test') // false

stringIsNumeric('10') // true
stringIsNumeric('0xFF') // true

stringIsNumeric(10) // throws TypeError
stringIsNumeric(null) // throws TypeError