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

1.0.3 • Public • Published

is-numeric

A CommonJS package that returns true when the argument is a digit, period or hyphen. Otherwise returns false.

Installation:

npm install @cstan/is-numeric

Use:

const { isNumeric } = require("@cstan/is-numeric")

let c = "k"; // a one char string

if (isNumeric(c)) {
console.log("It is a numeric char.")
} else {
console.log("It is NOT a numeric char.")
}`
// It is NOT a numeric char.

Readme

Keywords

Package Sidebar

Install

npm i @cstan/is-numeric

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

1.24 kB

Total Files

4

Last publish

Collaborators

  • cstanton48