6 lines
163 B
JavaScript
6 lines
163 B
JavaScript
var trim = require('./trim');
|
|
|
|
module.exports = function dasherize(str) {
|
|
return trim(str).replace(/([A-Z])/g, '-$1').replace(/[-_\s]+/g, '-').toLowerCase();
|
|
};
|