Version 1
[yaffs-website] / node_modules / underscore.string / slugify.js
diff --git a/node_modules/underscore.string/slugify.js b/node_modules/underscore.string/slugify.js
new file mode 100644 (file)
index 0000000..36dc73a
--- /dev/null
@@ -0,0 +1,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()), '-');
+};