* Change to using arrow functions Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Add lint rule --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
8 lines
239 B
TypeScript
8 lines
239 B
TypeScript
import { isDefined } from './isDefined';
|
|
|
|
export const isURL = (url: string | undefined | null) =>
|
|
isDefined(url) &&
|
|
url.match(
|
|
/^(https?:\/\/)?(www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/i,
|
|
);
|