MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / stripTrailingSlash

Function stripTrailingSlash

packages/common/src/string.ts:1–3  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

1export function stripTrailingSlash(url: string) {
2 return url.replace(/\/+$/, '');
3}
4
5export function stripLeadingAndTrailingSlashes(url: string) {
6 return url.replace(/^[/]+|[/]+$/g, '');

Callers 5

parseReferrerFunction · 0.90
onboarding.tsFile · 0.90
project.tsFile · 0.90
createProjectFunction · 0.90
updateProjectFunction · 0.90

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected