A pluggable JavaScript template engine. If it doesn't currently do what you want, odds are you can write a plugin to get it done.