amis-rpc-design/node_modules/string-convert/hyphen2camel.js

9 lines
222 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
var hyphen2camel = function (str) {
return str
.toLowerCase()
.replace(/-[a-z]/g, function (match) {
return match.slice(1).toUpperCase() ;
});
};
module.exports = hyphen2camel;