News for hackers. Stuff that matters.
Re:T.js - A tiny templating framework in ~400 bytes by petercooper on Monday August 13, 2012 @09:33PM (#4378971)
This isn't for the whole thing, but a common pattern to clean up that inner part could be something like:

    return { '>': '&gt;', '<': '&lt;', '&': '&amp', '"': '&quot;' }[t] || t
All formatted nicer than that, of course ;-)

There are no comments on this comment yet.