Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const sanitizeUrl = (url: string): string => {
messageValidator(url);
/*
* Flow for some reason (well, there is one...) doesn't play well when matching
* a string to a regex pattern.
*
* See this issue about that:
* https://github.com/facebook/flow/issues/3554
*/
/* $FlowFixMe */
return url.match(MATCH.URL)[0];
};