chore: 🤖 product -> plan

This commit is contained in:
amianthus
2025-10-17 12:44:39 +01:00
parent 07ffa08881
commit 33e2da3a5b
40 changed files with 106 additions and 100 deletions

View File

@@ -13,7 +13,13 @@ export const sumValues = (vals: number[]) => {
return vals.reduce((acc, curr) => acc + curr, 0);
};
export const keyToTitle = (key: string) => {
export const keyToTitle = (
key: string,
options?: { exclusionMap?: Record<string, string> },
) => {
if (options?.exclusionMap?.[key]) {
return options.exclusionMap[key];
}
return key
.replace(/[-_]/g, " ")
.replace(/\b\w/g, (char) => char.toUpperCase());