下划线命名转驼峰命名
function toUpperCase(str) { let nstr = str.replace(/(?:_)+([^_])/g, function ($0, $1) { return $1.toUpperCase(); }) nstr = nstr.replace(nstr[0], nstr[0].toLowerCase()) return nstr }
function toUpperCase(str) { let nstr = str.replace(/(?:_)+([^_])/g, function ($0, $1) { return $1.toUpperCase(); }) nstr = nstr.replace(nstr[0], nstr[0].toLowerCase()) return nstr }