10 lines
156 B
JavaScript
10 lines
156 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const hexRegex = require('hex-color-regex');
|
||
|
|
||
|
function isHex(str) {
|
||
|
return hexRegex({ exact: true }).test(str);
|
||
|
}
|
||
|
|
||
|
module.exports = isHex;
|