(word: string)
| 25 | const WORD_RE = /[A-Za-z0-9!#$%&'*+.^_`|~/-]/; |
| 26 | |
| 27 | const isToken = (word: string): boolean => [...word].every((ch) => TOKEN_RE.test(ch)); |
| 28 | // Unquoted URL values some providers emit (scheme://host/path?query): URI |
| 29 | // characters per RFC 3986, no whitespace/comma/quotes. |
| 30 | const isUrlish = (word: string): boolean => /^[A-Za-z][A-Za-z0-9+.-]*:\/\/[^\s,"]+$/.test(word); |