diff --git a/resources/js/helpers/url.ts b/resources/js/helpers/url.ts new file mode 100644 index 0000000..7ffc67a --- /dev/null +++ b/resources/js/helpers/url.ts @@ -0,0 +1,6 @@ +export const urlStripAttributes = (url: string): string => { + const urlObject = new URL(url); + urlObject.search = ""; + urlObject.hash = ""; + return urlObject.toString(); +};