keycloak_theme/src/lib/tools/pathJoin.ts

4 lines
141 B
TypeScript
Raw Normal View History

export function pathJoin(...path: string[]): string {
return path.map(part => part.replace(/^\/+/, "").replace(/\/+$/, "")).join("/");
}