README
is-decimal
Check if a character is decimal.
Install
This package is ESM only: Node 12+ is needed to use it and it must be import
ed
instead of require
d.
npm:
npm install is-decimal
Use
import {isDecimal} from 'is-decimal'
isDecimal('0') // => true
isDecimal('9') // => true
isDecimal('a') // => false
isDecimal('💩') // => false
API
This package exports the following identifiers: isDecimal
.
There is no default export.
isDecimal(character|code)
Check whether the given character code (number
), or the character code at the
first position (string
), is decimal.
Related
License
MIT © Titus Wormer