ishex
v2.1.0
Published
Tells you if a string is a valid hexadecimal number.
Downloads
68
Maintainers
Readme
isHex
Usage
import { isHex, isHexColor } from isHex; // ES6
// var IsHex = require('isHex'); // ES5
console.log(isHex("FFF")); // returns true
console.log(isHexColor("#FFFFFF")); // returns true
console.log(isHexColor("FFFFFF")); // returns true
console.log(isHex("FGF")); // returns false