Skip to content

Instantly share code, notes, and snippets.

@glenjamin
Created July 15, 2012 09:28
Show Gist options
  • Save glenjamin/3116057 to your computer and use it in GitHub Desktop.
Save glenjamin/3116057 to your computer and use it in GitHub Desktop.
Recursive render pseudo code
var root = template: "something", data: {}, children: {}
function render(obj)
partials = {}
for each name, child in obj.children
partials[name] = render(child)
return mustache(obj.template, obj.data, partials)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment