Skip to content

Instantly share code, notes, and snippets.

@hellerve
Last active January 5, 2016 03:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellerve/6a4aed746795ae36fb7a to your computer and use it in GitHub Desktop.
Save hellerve/6a4aed746795ae36fb7a to your computer and use it in GitHub Desktop.
The Poor Man's Templating Engine In JS
function templating(template, values) {
for(var k in values) {
template = template.replace('{{' + k.toString() + '}}', values[k].toString());
}
return template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment