node.js - hogan.js how to debug a variable -


i'm familiar javascript console.log(), , php_dump() functions allows see what's in variable, want know if there function in hogan.js let inspect content of variable.

add method data , include @ loctation need inspect scope

var data = {   ...   // vars,   ...   inspect: function () {     return function () {       console.log(this);     }   } };  template.render(data); 

anywhere use {{inspect}} log current render context in console


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -