Update slugify() util function to support plural initialisms

This commit is contained in:
Eric Jinks 2018-05-25 11:42:53 +10:00
parent ffefef1cec
commit a7fe81f18f
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
## 0.2.7 - 2018-05-25
* Update slugify() util function to support plural initialisms
## 0.2.6 - 2018-05-25 ## 0.2.6 - 2018-05-25
* Add slugify() util function * Add slugify() util function

View file

@ -3,6 +3,7 @@ import _kebabCase from 'lodash/kebabCase'
export const slugify = (string = '') => export const slugify = (string = '') =>
// keeps forward slashes // keeps forward slashes
string string
.toLowerCase()
.split('/') .split('/')
.map(_kebabCase) .map(_kebabCase)
.join('/') .join('/')