1.0.4 • Published 2 years ago

@cstan/is-digit v1.0.4

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

@cstan/is-digit

A commonjs package that returns true if its single character argument is a digit else false.

Installation:

npm install @cstan/is-digit

Use:

const { isDigit } = require("@cstan/is-digit")

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

if (isDigit(c)) {
console.log(`'${c}' is a digit.`)
} else {
console.log(`'${c}' is NOT a digit.`)
}
// 'k' is NOT a digit.
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago