News for hackers. Stuff that matters.
Re:T.js - A tiny templating framework in ~400 bytes by alexgartrell on Monday August 13, 2012 @07:41PM (#4378710)

  render("{a} is all that I've {a}", {'a' : 'b'});
  "b is all that I've b"
  render("{a} is all that I've {{a}}", {'a' : 'b'});
  SyntaxError: Unexpected token {
Seems Legit
Re:T.js - A tiny templating framework in ~400 bytes by pfraze on Monday August 13, 2012 @07:53PM (#4378740)

  function render(tpl,data){
  	var matches = tpl.match(/{[^\}]+}/g);
  	for(var i in matches){
  		var rep =   eval("data."+matches[i].replace(/[{}]/g,''));
  		tpl = tpl.replace(matches[i],rep);
  	}                                     
  	return tpl;
  }
Fixed
Re:T.js - A tiny templating framework in ~400 bytes by vain on Monday August 13, 2012 @07:49PM (#4378727)
looks like something broke in copying and pasting. try: http://pastebin.com/txM6NZBS