OCA_Backend/api/node_modules/validator/es/lib/isHexadecimal.js

6 lines
189 B
JavaScript
Raw Normal View History

2022-01-22 13:36:44 +00:00
import assertString from './util/assertString';
var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
export default function isHexadecimal(str) {
assertString(str);
return hexadecimal.test(str);
}