Reviewed-on: #12 Co-authored-by: Luciano Giacchetta <giacchetta-@outlook.com> Co-committed-by: Luciano Giacchetta <giacchetta-@outlook.com>
4 lines
141 B
TypeScript
4 lines
141 B
TypeScript
export const fromSnakeCase = (text: string) => {
|
|
return text.replace(/-/g, ' ').replace(/\b\w/g, (word: string) => word.toUpperCase());
|
|
};
|