README
is-hexadecimal
Check if a character is hexadecimal.
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-hexadecimal
Use
import {isHexadecimal} from 'is-hexadecimal'
isHexadecimal('a') // => true
isHexadecimal('0') // => true
isHexadecimal('G') // => false
isHexadecimal('💩') // => false
API
This package exports the following identifiers: isHexadecimal
.
There is no default export.
isHexadecimal(character|code)
Check whether the given character code (number
), or the character code at the
first position (string
), is isHexadecimal.
Related
License
MIT © Titus Wormer