(url, base)
| 112 | export const fromString: { |
| 113 | (url: string, base?: string | URL | undefined): Result.Result<URL, Cause.IllegalArgumentError> |
| 114 | } = (url, base) => |
| 115 | Result.try({ |
| 116 | try: () => new URL(url, base), |
| 117 | catch: () => |
| 118 | new Cause.IllegalArgumentError(`Invalid URL: "${url}"${base !== undefined ? ` with base "${base}"` : ""}`) |
| 119 | }) |
| 120 | |
| 121 | /** |
| 122 | * Updates a cloned `URL` with a callback, allowing multiple changes at once. |
nothing calls this directly
no outgoing calls
no test coverage detected