Created
August 12, 2010 17:52
-
-
Save premasagar/521352 to your computer and use it in GitHub Desktop.
A tiny, secure JavaScript micro-templating script. It doesn't use eval or (new Function), so it cannot execute malicious code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
== Tim == | |
A tiny, secure JavaScript micro-templating script. | |
This has now moved to: | |
github.com/premasagar/tim | |
*/ |
I just added a little debugging block, to help track down missing properties in the data object, and an option third argument "notFound", which can be used as the default string when a property is not found in the data object. See the notes at the top of the script.
(BTW - I'm probably going to spin this off into its own GitHub project repository soon).
I've now moved Tim to http://github.com/premasagar/tim
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great. Please do, Michael. Let me know if you put it to good use.