一 js下划线转驼峰处理
JS
function snakeToCamel(str) {
return str.replace(/([-_])([a-z])/g, function(match, letter) {
return letter.toUpperCase();
});
}