Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
19
node_modules/next/dist/esm/lib/url.js
generated
vendored
Normal file
19
node_modules/next/dist/esm/lib/url.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';
|
||||
const DUMMY_ORIGIN = 'http://n';
|
||||
export function isFullStringUrl(url) {
|
||||
return /https?:\/\//.test(url);
|
||||
}
|
||||
export function parseUrl(url) {
|
||||
let parsed = undefined;
|
||||
try {
|
||||
parsed = new URL(url, DUMMY_ORIGIN);
|
||||
} catch {}
|
||||
return parsed;
|
||||
}
|
||||
export function stripNextRscUnionQuery(relativeUrl) {
|
||||
const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN);
|
||||
urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY);
|
||||
return urlInstance.pathname + urlInstance.search;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=url.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue