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

1.0.4 • Public • Published

@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.

Readme

Keywords

Package Sidebar

Install

npm i @cstan/is-digit

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

1.2 kB

Total Files

4

Last publish

Collaborators

  • cstanton48