5 lines
134 B
JavaScript
5 lines
134 B
JavaScript
const toKebabCase = (str) => {
|
|
return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
};
|
|
|
|
module.exports = toKebabCase;
|