下划转驼峰命名,直接上代码
/**
* 下划转驼峰
*/
function camelCase(str) {
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
}
下划转驼峰命名,直接上代码
/**
* 下划转驼峰
*/
function camelCase(str) {
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
}