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

Function stripLeadingAndTrailingSlashes

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

Source from the content-addressed store, hash-verified

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

Callers 2

matchEventFiltersFunction · 0.90

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected