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:
parent
b9fe8c7f38
commit
6109bb690d
5 changed files with 15 additions and 6 deletions
9
src/util.js
Normal file
9
src/util.js
Normal 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 };
|
||||
Loading…
Add table
Add a link
Reference in a new issue