anorgatarrak-wordpress-theme/node_modules/underscore.string/slugify.js

8 lines
260 B
JavaScript

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()), '-');
};