(uri: string)
| 15 | } |
| 16 | |
| 17 | export function uriToPath(uri: string): string | null { |
| 18 | if (!uri.startsWith("file://")) { |
| 19 | return null; |
| 20 | } |
| 21 | try { |
| 22 | return fileURLToPath(uri); |
| 23 | } catch { |
| 24 | return null; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | export function uriToSlug(uri: string): string | null { |
| 29 | if (!uri.startsWith("slug://")) { |
no outgoing calls
no test coverage detected