4 lines
183 B
JavaScript
4 lines
183 B
JavaScript
export const capitalize = (string) => string.substring(0, 1).toUpperCase() + string.substring(1);
|
|
|
|
export const camelCase = (string) => string.split(/[_-]/).map(capitalize).join('');
|