UNPKG

mr-case

Version:

55 functions to seamlessly transform strings, arrays, and object keys between different cases (camelCase, snake_case, kebab-case, PascalCase, Title Case, and more), clean and format text, extract URL components, and perform common text operations like mas

5 lines (4 loc) 126 B
function toCamel(str) { return str.replace(/_([a-z])/g, (_, char) => char.toUpperCase()); } module.exports = toCamel;