(url: string)
| 314 | export type BrowserOpenCommand = readonly [command: string, args: ReadonlyArray<string>]; |
| 315 | |
| 316 | const normalizeBrowserOpenUrl = (url: string): string | undefined => { |
| 317 | try { |
| 318 | const parsed = new URL(url); |
| 319 | return parsed.protocol === "http:" || parsed.protocol === "https:" ? parsed.href : undefined; |
| 320 | } catch { |
| 321 | return undefined; |
| 322 | } |
| 323 | }; |
| 324 | |
| 325 | export const browserOpenCommand = ( |
| 326 | url: string, |
no outgoing calls
no test coverage detected