feat(nuxt): nuxt3 -> nuxt4
This commit is contained in:
10
shared/utils/formatting.ts
Normal file
10
shared/utils/formatting.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const capitalize = (str: string) =>
|
||||
str.charAt(0).toUpperCase() + str.slice(1);
|
||||
|
||||
export const upperCase = (str: string) => str.toUpperCase();
|
||||
|
||||
export const arrayToUnion = (array: string[] | readonly string[]) =>
|
||||
array.map((x) => `"${x}"`).join(" | ");
|
||||
|
||||
export const unreadonly = <T extends string>(arr: readonly T[]): string[] =>
|
||||
[...arr] as string[];
|
||||
Reference in New Issue
Block a user