Skip to content

Instantly share code, notes, and snippets.

@OscarGodson
Created September 9, 2011 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OscarGodson/1207407 to your computer and use it in GitHub Desktop.
Save OscarGodson/1207407 to your computer and use it in GitHub Desktop.
var parseTemplate = function(s,j){
for(x in j){ var r = new RegExp('{{'+x+'}}','g'); s = s.replace(r,j[x]); }
return s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment