color-fns
Version:
Modern JavaScript color utility library.
11 lines • 368 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function isHexShorthand(hex) {
var regex = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])*$/i;
if ((hex.length === 5 || hex.length === 4) && regex.test(hex)) {
return true;
}
return false;
}
exports.isHexShorthand = isHexShorthand;
//# sourceMappingURL=isHexShorthand.js.map