-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The method kebabcase from lodash replace the char . with -
We can replace the kebabcase method with this :
removeNonAsciiChar(
transform(
text.toString()
)
).toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-\.]+/g, '') // Remove all non-word chars
.replace(/\--+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, '') // Trim - from end of textWhat do you think ?
Metadata
Metadata
Assignees
Labels
No labels