Created
August 13, 2014 17:51
-
-
Save doingweb/0a5d15318a29df75ed9d to your computer and use it in GitHub Desktop.
Assemble (Handlebars) helper for printing JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.register = function (Handlebars, options, params) { | |
Handlebars.registerHelper('json', function(context) { | |
return JSON.stringify(context, null, 2); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use it for quick debugging when a template isn't coming out with what I expect: