(url: string)
| 25 | } |
| 26 | |
| 27 | export function normalizeURL(url: string): string { |
| 28 | const normalized = normalizeUrl(url, { stripWWW: false }) |
| 29 | |
| 30 | return decodeURIComponent(normalized).replace(/\s/g, '+').toString() |
| 31 | } |
| 32 | |
| 33 | export function truncate(string: string, limit: number = 100) { |
| 34 | if (!string) return string |