chore: 🤖 product -> plan
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user