slugify.js 260 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 var trim = require('./trim'); var dasherize = require('./dasherize'); var cleanDiacritics = require("./cleanDiacritics"); module.exports = function slugify(str) { return trim(dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g, '-').toLowerCase()), '-'); };