Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

193 B
Raw Blame
export function stripTrailingSlash(url: string) {
  return url.replace(/\/+$/, '');
}

export function stripLeadingAndTrailingSlashes(url: string) {
  return url.replace(/^[/]+|[/]+$/g, '');
}