add filepath replacement setting (#1402)

This commit is contained in:
jeffvli
2026-01-01 21:46:58 -08:00
parent e406b27170
commit 6aeec1e89c
13 changed files with 594 additions and 165 deletions
+8
View File
@@ -471,3 +471,11 @@ export const sortRadioList = (
return results;
};
export const replacePathPrefix = (path: string, replacePrefix?: string, addPrefix?: string) => {
if (replacePrefix && path.startsWith(replacePrefix)) {
return path.slice(replacePrefix.length);
}
return addPrefix ? addPrefix + path : path;
};