-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: opt-in support of whatwg-url mock (#15)
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// https://www.npmjs.com/package/whatwg-url | ||
|
||
export const URL = globalThis.URL | ||
export const URLSearchParams = globalThis.URLSearchParams | ||
|
||
function notSupported () { | ||
throw new Error('[unenv] whatwg-url low level API is not supported yet!') | ||
} | ||
|
||
export const parseURL = notSupported | ||
export const basicURLParse = notSupported | ||
export const serializeURL = notSupported | ||
export const serializeHost = notSupported | ||
export const serializeInteger = notSupported | ||
export const serializeURLOrigin = notSupported | ||
export const setTheUsername = notSupported | ||
export const setThePassword = notSupported | ||
export const cannotHaveAUsernamePasswordPort = notSupported | ||
export const percentDecodeBytes = notSupported | ||
export const percentDecodeString = notSupported |