1.0.1 • Published 2 years ago

@cstan/is-dec-comma-numeric v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

is-dec-comma-numeric

A CommonJS package that returns true if the argument is a digit, hyphen or comma, else false. Used in locations where the decimal marker is a comma.

Installation:

npm install @cstan/is-dec-comma-numeric

Use:

const { isDecCommaNumeric } = require("cstan/is-dec-comma-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.

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