News for hackers. Stuff that matters.
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

There are no comments on this comment yet.