function isValidSlug isValidSlug(slug: string,max?: number): boolean Checks whether slug matches SLUG_RE and is at most max characters long. Parameters slug: string optional max: number = SLUG_MAX Return Type boolean