1 | // Copyright 2021 Fastly, Inc.
|
2 |
|
3 | // Create a constant to special schemes we will need to match for
|
4 | // https://url.spec.whatwg.org/#special-scheme
|
5 | export const SPECIAL_SCHEMES = [
|
6 | "ftp:",
|
7 | "file:",
|
8 | "http:",
|
9 | "https:",
|
10 | "ws:",
|
11 | "wss:",
|
12 | ];
|
13 |
|
14 | export function throwInvalidUrlError(): void {
|
15 | throw new Error("Failed to construct 'URL': Invalid URL");
|
16 | }
|