Created
October 29, 2010 22:29
-
-
Save akdubya/654570 to your computer and use it in GitHub Desktop.
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
{ | |
"helper": function(chunk, context, bodies, params) { | |
if (typeof params.foo === "function") { | |
// if params.foo is a function body, render it | |
return params.foo(chunk, context); | |
} | |
// otherwise just echo the string | |
return chunk.write(params.foo); | |
}, | |
"what": "pie" | |
} |
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
I like pie |
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
{#helper foo="I like {what}"/} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment