MCPcopy
hub / github.com/streamlit/streamlit / parseUriIntoBaseParts

Function parseUriIntoBaseParts

frontend/connection/src/utils.ts:64–72  ·  view source on GitHub ↗
(url?: string)

Source from the content-addressed store, hash-verified

62 * Return the BaseUriParts for either the given url or the global window
63 */
64export function parseUriIntoBaseParts(url?: string): URL {
65 const currentUrl = new URL(url ?? window.location.href)
66
67 currentUrl.pathname = currentUrl.pathname
68 .replace(FINAL_SLASH_RE, "")
69 .replace(INITIAL_SLASH_RE, "")
70
71 return currentUrl
72}
73
74// NOTE: In the multipage apps world, there is some ambiguity around whether a
75// path like "foo/bar" means

Callers 5

utils.test.tsFile · 0.90
doInitPingsFunction · 0.90
buildDownloadUrlMethod · 0.90
AppClass · 0.90
getPossibleBaseUrisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…