setup ava for ts, port test/ to ts
This commit is contained in:
parent
acbf06e4ac
commit
09980caa67
8 changed files with 58 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
function isHexColor(color) {
|
||||
function isHexColor(color: string) {
|
||||
return /(^#[0-9A-F]{6,8}$)|(^#[0-9A-F]{3}$)/i.test(color); // https://regex101.com/
|
||||
}
|
||||
|
||||
module.exports.isHexColor = isHexColor;
|
||||
export {isHexColor};
|
||||
Loading…
Add table
Add a link
Reference in a new issue