Create a gist now

Instantly share code, notes, and snippets.

Handlebars.registerHelper('slugify', function(title) {
return title.toLowerCase()
.replace(/ /g,'-')
.replace(/[^\w-]+/g,'');
});
@ZaneHannanAU
ZaneHannanAU commented Nov 26, 2016 edited

Line 3

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