@cstan/is-numeric
v1.0.3
Published
Returns true for all numeric characters, else false.
Downloads
4
Readme
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.