fix path generation
All checks were successful
/ build (pull_request) Successful in 39s
/ cleanup-staging (pull_request) Successful in 3s

This commit is contained in:
kritzl 2026-07-11 08:36:41 +02:00
commit 89f19e25f8
Signed by: kritzl
SSH key fingerprint: SHA256:5BmINP9VjZWaUk5Z+2CTut1KFhwLtd0ZynMekKbtViM
2 changed files with 8 additions and 1 deletions

6
src/utils/path.ts Normal file
View file

@ -0,0 +1,6 @@
export default function path(...components: Array<string>){
return '/' + components
.map(component => component.trim().replace(/(^[\/]*|[\/]*$)/g, ''))
.filter(component => component.length > 0)
.join("/")
}