I have a a textarea which are compile with Mustachejs together with a json object into html. It works as intended but I would like some debugging information if there are variables that are undefined. For instance if I have
var data = { "totle" : "My cool page"}; // Noticed the misspelled name
<h3>{{title}}</h3>
it would result in an empty h3 tag. I would, somehow, like to get information that "title" is undefined, is this possible?
I ended up writing the logic myself sort of. The renderTokens method in mustache.js is where the lookup is made. I make checks in the switch to look for values which are undefined if they are I store the tokenValue in a global array which I can present as the result of all undefined values.