setup ava for ts, port test/ to ts

This commit is contained in:
Labhansh Agrawal 2019-12-14 12:01:15 +05:30 committed by Benjamin Staneck
parent acbf06e4ac
commit 09980caa67
8 changed files with 58 additions and 10 deletions

View file

@ -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};