dasherize.js 163 Bytes Raw Blame History Permalink 1 2 3 4 5 var trim = require('./trim'); module.exports = function dasherize(str) { return trim(str).replace(/([A-Z])/g, '-$1').replace(/[-_\s]+/g, '-').toLowerCase(); };