amis-rpc-design/node_modules/string-convert/camel2hyphen.js
2023-10-07 19:42:30 +08:00

9 lines
216 B
JavaScript

var camel2hyphen = function (str) {
return str
.replace(/[A-Z]/g, function (match) {
return '-' + match.toLowerCase();
})
.toLowerCase();
};
module.exports = camel2hyphen;