4 ms·
JSON template looks nice. Great feature set. I don't know about the python version, but I had a look at the Javascript code for json-template. At first look it
by arnorhs 16y ago
JSON template looks nice. Great feature set.
I don't know about the python version, but I had a look at the Javascript code for json-template. At first look it seems pretty "hacky". The main obvious flaws I saw were:
- it's polluting the global namespace a lot. Introducing a lot of functions and variables.
- it's roughly 800 lines, while mustache.js is just over 300. I realize json template has more features.
- A lot of the javascript could do with some optimization. Especially some of the loops.
But maybe that's something you simply want help with?
- chubot 16y agoEverything is wrapped in the "jsontemplate" namespace. It's just not indented. If you have some speedups I'm open to it, although I think it is pretty fast as it doesn't parse the template on every expansion.