Skip to content

Instantly share code, notes, and snippets.

@doginthehat
Created February 28, 2012 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save doginthehat/1928037 to your computer and use it in GitHub Desktop.
Save doginthehat/1928037 to your computer and use it in GitHub Desktop.
whatis - a simple debug helper for handlebars
Handlebars.registerHelper('whatis', function(param, options) {
var label = options.hash.label ? options.hash.label + '=%o' : "%o";
try {
console && console.log && console.log(label,param);
options.hash.show_options && console && console.log && console.log("options=%o",options);
} catch (ex)
{
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment