Skip to content

Commit 29ba9ae

Browse files
committed
refactor(removeTrailingSlash): move to core/utils
Signed-off-by: J3m5 <[email protected]>
1 parent bddedaa commit 29ba9ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/utils/removeTrailingSlash.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function removeTrailingSlash(url: string): string {
2+
if (url.endsWith("/")) {
3+
return url.slice(0, -1);
4+
}
5+
6+
return url;
7+
}

0 commit comments

Comments
 (0)