diff options
Diffstat (limited to 'src/util/files.ts')
-rw-r--r-- | src/util/files.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/files.ts b/src/util/files.ts new file mode 100644 index 0000000..ec1f584 --- /dev/null +++ b/src/util/files.ts @@ -0,0 +1,7 @@ +export const cleanPath = (path: string) => { + return path + .replace("/files/", "") + .replace("../", "") // TODO: Fix relative ../ + .replace("./", "") + .replace(/([^:]\/)\/+/g, "$1"); +}; |