Files
icehrm/web/node_modules/string-convert/camel2hyphen.js
2020-05-20 18:47:29 +02: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;