Instantly share code, notes, and snippets.

Embed
What would you like to do?
Handlebars.registerHelper('slugify', function(title) {
return title.toLowerCase()
.replace(/ /g,'-')
.replace(/[^\w-]+/g,'');
});
@ZaneHannanAU

This comment has been minimized.

Show comment
Hide comment
@ZaneHannanAU

ZaneHannanAU Nov 26, 2016

Line 3

.replace(/\s+/g,'-')

ZaneHannanAU commented Nov 26, 2016

Line 3

.replace(/\s+/g,'-')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment