1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-21 22:34:21 +00:00

🧹 Remove unused path segments

This commit is contained in:
Steffo 2021-11-05 16:16:25 +01:00
parent 541da3b27b
commit ee19cfcd63
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -54,8 +54,6 @@ export function parsePath(path: string): ParsedPath {
}
result.instance = path.match(/[/]i[/]([^/]+)/)?.[1]
result.userId = path.match(/[/]u[/]([0-9]+)/)?.[1]
result.userName = path.match(/[/]u[/]([A-Za-z0-9_-]+)/)?.[1]
result.researchGroup = path.match(/[/]g[/]([A-Za-z0-9_-]+)/)?.[1]
result.researchProject = path.match(/[/]p[/]([A-Za-z0-9_-]+)/)?.[1]
result.notebook = path.match(/[/]n[/]([A-Za-z0-9_-]+)/)?.[1]
@ -64,12 +62,6 @@ export function parsePath(path: string): ParsedPath {
if(result.instance) {
result.count += 1
}
if(result.userId) {
result.count += 1
}
if(result.userName) {
result.count += 1
}
if(result.researchGroup) {
result.count += 1
}