1.0.0 • Published 7 years ago

hex-check v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

hex-check :milky_way: Build Status

Checks if a string or number is a valid hexadecimal value.

Usage

const hexCheck = require('hex-check');

hexCheck(934);
// returns 'true'
hexCheck(243212);
// returns 'true'
hexCheck(0x5012FF);
// returns 'true'
hexCheck('1C3DFF00E140B');
// returns 'true'
hexCheck('2B78G');
// returns 'false'
hexCheck('0x40015');
// returns 'false'

License

MIT © Damian Polak