Unify slugify()

Provides a new util.js file with a unified `slugify()` function that also
lowercases the slug. Change all uses of `slugify()` to use this instead.
This commit is contained in:
Nick Pegg 2017-10-11 22:25:46 -07:00
parent b9fe8c7f38
commit 6109bb690d
5 changed files with 15 additions and 6 deletions

9
src/util.js Normal file
View file

@ -0,0 +1,9 @@
import baseSlugify from 'slugify';
function slugify(s) {
// Slugify a string to our specs. Hooray consistency!
return baseSlugify(s).toLowerCase();
}
export { slugify };