({pathname, host, hostname, port}: URL)
| 64 | const invalidChars ='\\:?*"><|' |
| 65 | |
| 66 | export function urlToFilenameWithoutHash({pathname, host, hostname, port}: URL) { |
| 67 | for (const char of invalidChars) { |
| 68 | pathname = pathname.replace(char, "_"); |
| 69 | } |
| 70 | return path.join('/', (port ? `${hostname}_PORT${port}` : host), pathname) |
| 71 | } |
no outgoing calls
no test coverage detected