Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
templayed.js - The Fastest & Smallest Mustache Compliant Templating Library (archan937.github.com)
29 points by Hirvesh on Dec 3, 2012 | hide | past | favorite | 9 comments



BENCHMARK RESULTS can be found here: https://github.com/archan937/templayed.js/

BENCHMARK TESTS can be run here: http://jsperf.com/mustache-compliant-libraries/7

------------------------------------------------------------------------------------------------------------------------

via Functionn - Open Source Resources For Web Developers & Designers: http://functionn.blogspot.com/2012/10/templayedjs-fastest-an...

P.S. Functionn contains a whole lot more of awesome resources like templayed.js. There only a fraction of them I can post here at a time. Take a look if you're interested, and subscribe:

http://functionn.blogspot.com


I noticed after reading the repo that it doesn't support partials or streaming. Still a pretty nice effort, but I suspect for many lack of partial support is a big issue.


Also, on the semi-ridiculous yet fantastic side of things: https://gist.github.com/1347239


not as ridiculous as this. https://gist.github.com/969788


Sorta fails on the list example. The ul's are always displayed even with nothing in the list. It's missing the template definition for lists.

{{#names}}<ul>{#item}<li>{{name}}</li>{{/item}}</ul>{{/names}}



Resig wrote about micro templating in 2008, and his code is much more terse plus it'd be trivial to add interpolation for {{ }}.

Source: http://ejohn.org/blog/javascript-micro-templating/

(Tip: read through all the comments)


Used it for years. Not sure that something else can match its speed.

The only downside is the tricky debugging.


Moustache is more than just {{ }}




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: