Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
export
function
stripTrailingSlash(url: string) {
2
return
url.replace(/\/+$/,
''
);
3
}
4
5
export
function
stripLeadingAndTrailingSlashes(url: string) {
6
return
url.replace(/^[/]+|[/]+$/g,
''
);
Callers
5
parseReferrer
Function · 0.90
onboarding.ts
File · 0.90
project.ts
File · 0.90
createProject
Function · 0.90
updateProject
Function · 0.90
Calls
1
replace
Method · 0.80
Tested by
no test coverage detected