Skip to content

Commit

Permalink
utils(regex): add regex for twitch channel name
Browse files Browse the repository at this point in the history
Signed-off-by: TRACTION <[email protected]>
  • Loading branch information
iamtraction committed Nov 19, 2023
1 parent 7548378 commit 4fdcf0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ export const WEBHOOK_URL = /(?:https:\/\/)(?:www\.)?(?:discordapp|discord)\.com\
export const REGEX_CMYK = /^(\d{1,2}|100) (\d{1,2}|100) (\d{1,2}|100) (\d{1,2}|100)$/;
export const REGEX_RGB = /^(\d{1,2}|1\d{2}|2[0-5]{2}) (\d{1,2}|1\d{2}|2[0-5]{2}) (\d{1,2}|1\d{2}|2[0-5]{2})$/;
export const REGEX_HEX = /^#?(?:(?:([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2}))|(?:([0-9A-F])([0-9A-F])([0-9A-F])))$/i;

export const TWITCH_CHANNEL = /^[a-z\d][\w]{0,24}$/i;

0 comments on commit 4fdcf0b

Please sign in to comment.