|
|
|
|
|
by SethKinast
4074 days ago
|
|
Dust.js (http://www.dustjs.com/) Dust is flexible asynchronous templating for both the browser and server. The project languished for awhile, which I think led to it falling by the wayside popularity-wise. I picked up development last year, and the last nine months or so have seen rapid improvement of the language and documentation. I feel like Dust would fit many use cases way better than people's current templating solutions. Because it's asynchronous, you can put Promises and Streams right into your template variables, and Dust will handle them properly. So for example, you can pass ReQL cursors straight into Dust, and it'll stream them into the template, so you get progressive rendering in the browser without buffering the whole result set in memory. r.table("messages").orderBy({index: "date"}).run(conn, function(err, cursor) {
dust.render("inbox", { messages: cursor }).pipe(res);
});
|
|