Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Quick-and-dirty helper to convert strings into URL-friendly slugs.
- const slugify = str =>
- str
- .toLowerCase()
- .replace(/[^a-z0-9]+/g, '-')
- .replace(/(^-|-$)+/g, '');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement