chore: initial work on making sure that epub is fully valid

This commit is contained in:
Corbin Crutchley
2022-06-26 04:27:25 -07:00
parent aa7047bd38
commit 4dda6e0be0
2 changed files with 9 additions and 4 deletions

View File

@@ -20,3 +20,8 @@ export const getFullRelativePath = (...paths: string[]) => {
? slash(join(...paths))
: paths[paths.length - 1];
};
export const trimTrailingSlash = (path: string) => {
if (path.endsWith("/")) return path.slice(0, path.length - 1);
return path;
};