refactor: split into component and use global app store
This commit is contained in:
7
utils/formatting.ts
Normal file
7
utils/formatting.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const capitalize = (str: string) =>
|
||||
str.charAt(0).toUpperCase() + str.slice(1);
|
||||
|
||||
export const upperCase = (str: string) => str.toUpperCase();
|
||||
|
||||
export const arrayToUnion = (array: string[]) =>
|
||||
array.map((x) => `"${x}"`).join(" | ");
|
||||
Reference in New Issue
Block a user