mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2024-11-20 19:07:20 +01:00
6 lines
200 B
TypeScript
6 lines
200 B
TypeScript
|
export function join(parts: string[], sep = "/") {
|
||
|
const separator = sep || "/";
|
||
|
const replace = new RegExp(separator + "{1,}", "g");
|
||
|
return parts.join(separator).replace(replace, separator);
|
||
|
}
|