Home > @asl-19/js-utils > getRootRelativeUrl
Given a fully-qualified URL, returns a root-relative URL.
Signature:
getRootRelativeUrl: (fullyQualifiedUrl: string) => string|
Parameter |
Type |
Description |
|---|---|---|
|
fullyQualifiedUrl |
string |
Returns:
string
getRootRelativeUrl("https://asl19.org/")
// "/"
getRootRelativeUrl("https://asl19.org/foo")
// "/foo"