DailyJS

Node Roundup: 0.8.10-11, Cabinet, Node Si

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

node modules

Node Roundup: 0.8.10-11, Cabinet, Node Si

Posted by Alex R. Young on .
Featured

node modules

Node Roundup: 0.8.10-11, Cabinet, Node Si

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

0.8.10

Node 0.8 releases are still coming thick and fast, with the release of 0.8.10 this week. On average the 0.8 branch has seen approximately 9 days between releases, with an extended summer holiday period of 20 days in August and September.

This version has a few fs fixes by Ben Noordhuis, although he's already cited an issue in fs.stat() so he's recommending holding off for 0.8.11 which should be released later this week.

Cabinet

Cabinet (License: MIT, npm: cabinet) by Manuel Astudillo is an alternative to Connect's static middleware. The changes from TJ's original module are as follows:

  • Memory-based cache, based on fs.watch
  • Automatic asset compilation and minification
  • gzip
  • Support for "virtual" files, including cache manifests

The API is compatible with Connect and Express middleware, but there are additional options:

app.use(cabinet(__dirname + '/static', {  
  coffee: true,
  gzip: true,

  less: {
    // Specify search paths for @import directives
    paths: ['.',__dirname + '/static/stylesheets']
  },

  cache: { maxSize: 1024, maxObjects:256 }
}));

The project comes with Mocha tests, and additional options are documented in the readme file.

Node Si

Node Si (License: MIT, npm: si) by MichaƂ Czapracki is a binary prefix number parser and formatter module. It can be used to format numbers like 10000000 as 10M, or 10gb as 1e10.

It's currently a simple module, but the author plans on adding IEC compliant binary multipliers like 'MiB', case sensitive formats, and fractional SI multipliers.