Node Roundup: 0.9.5, juxt, email-templates

Alex R. Young





functional node email modules express

Node Roundup: 0.9.5, juxt, email-templates

Posted by Alex R. Young on .

functional node email modules express

Node Roundup: 0.9.5, juxt, email-templates

Posted by Alex R. Young on .
You can send in your Node projects for review through our contact form or @dailyjs.

Node 0.9.5

Node 0.9.5 (unstable) is out, and Isaac said weekly releases will be the norm for the near future:

For the next month at least, the primary focus will be on bug fixing and performance. Expect nearly-weekly releases until v0.10 is ready.

Amongst the raft of bug fixes, the updated stream module has some tweaks as well:

  • stream: fix to emit end event on http.ClientResponse (Shigeki Ohtsu)
  • stream: fix event handler leak in readstream pipe and unpipe (Andreas Madsen)


juxt (License: WTFPL, npm: juxt) by Azer Koculu is a small module that takes in functions and outputs a new function that stitches them together:

function inc1(n) { return n+1 };  
function inc2(n) { return n+2 };  
function inc3(n) { return n+3 };

juxt(inc1, inc2, inc3)(314); // returns [315, 316, 317]  

It also has an asynchronous API, and will intelligently collate arguments into arrays or objects.


email-templates (License: MIT, npm: email-templates) by Nick Baugh is a module for rendering email templates using ejs and "email-friendly" inline CSS. When I make Node web applications, I usually treat emails as an afterthought, rendering them with Jade or ejs. However, there are times when more attention to design is required, and this is made difficult in email due to the way certain major email clients treat CSS.

Juice from LearnBoost is used to generate suitable style attributes based on your CSS, making the task of inlining CSS less messy. The module will also generate a text version of the email if a suitable template is provided. The author has provided a full example with Nodemailer.

Nick also sent in a few of his other interesting modules, including express-cdn (GitHub: niftylettuce / express-cdn, License: MIT, npm: express-cdn) which automatically optimises assets in Express applications. The assets will be delivered using Amazon S3 and CloudFront, so you can create your own CDN.