8 lines
260 B
JavaScript
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()), '-');
|
|
};
|