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 | |
*/ |
Awesome prem, I'm so going to use that in projects from now on.
Great. Please do, Michael. Let me know if you put it to good use.
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
Aha! Thanks, Aron. You are right. Updated the Gist...