Skip to content

Function removeBaseUrl() ​

removeBaseUrl(url: string): string

Source: url.utils.ts

Removes the origin/base from a URL string.

Parameters ​

url ​

string

The URL string.

Returns ​

string

The URL string without its origin.

Example ​

ts
removeBaseUrl("https://example.com/foo/bar") === "/foo/bar"

Built by Prozilla