validate.ts 181 B

12345
  1. export const isValidUsername = (str: string) =>
  2. ["admin", "editor"].indexOf(str.trim()) >= 0;
  3. export const isExternal = (path: string) =>
  4. /^(https?:|mailto:|tel:)/.test(path);