Node Roundup: 0.4.9, 0.5.0, node-secure, Kue

2011-07-06 00:00:00 +0100 by Alex R. Young
You can send your node modules and articles in for review through our [contact form](/contact.html) or [@dailyjs](http://twitter.com/dailyjs).

Node 0.4.9, 0.5.0

Node 0.4.9 and Node 0.5.0
have been released. The 0.4.9 updates include SSL and crypto fixes,
performance improvements for util.inherits, a V8 engine
update, and module loading changes to better support nested project

Node 0.5.0 is where things start to get exciting for Windows users.
There's a (non-default) libuv backend to support IOCP in Windows. In
terms of deprecations, only http.cat is mentioned. There's
a huge amount of fixes and improvements elsewhere, but one thing I
noticed was AMD

Node's modules have access to a function named define, which may be used to specify the module's return value. This is not necessary in node programs, but is present in the node API in order to provide compatibility with module loaders that use the Asynchronous Module Definition pattern.


node-secure (npm: node-secure) by David de Rosier is a module that protects globals from being overridden that programs may depend on for safe execution:
undefined, NaN, Infinity,
eval, isNaN.

This module also adds event handling to eval:

var secure = require('node-secure');
secure.on('eval', function(caller) {
  console.log('Evel executed in following function:', caller);

The project's README contains a lot more examples, including David's
reasoning behind the features.


Kue (License: MIT, npm: kue) by TJ Holowaychuk and LearnBoost is a priority job queue backed by redis.
Queues and jobs are created like this:

var kue = require('kue')
  , jobs = kue.createQueue();

jobs.create('email', {
    title: 'welcome email for tj'
  , to: 'tj@learnboost.com'
  , template: 'welcome-email'

Then elsewhere they can be processed:

jobs.process('email', function(job, done){
  email(job.to, done);

The job object also has job.progress(frames,
for displaying progress during long-running jobs.

Kue also comes with a little Express app for managing jobs:

var kue = require('kue');