(length = 24)
| 5 | export const plural = (count: number, str: string): string => (count === 1 ? str : `${str}s`) |
| 6 | |
| 7 | export const generateUuid = (length = 24): string => { |
| 8 | const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
| 9 | return Array(length) |
| 10 | .fill(1) |
| 11 | .map(() => possible[Math.floor(Math.random() * possible.length)]) |
| 12 | .join("") |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Remove extra slashes in a URL. |
no outgoing calls
no test coverage detected