Node Roundup: redis-stream, DataGen, Cushion

2012-09-05 00:00:00 +0100 by Alex R. Young
You can send in your Node projects for review through our contact form or @dailyjs.


redis-stream (License: MIT, npm: redis-stream) by Thomas Blobaum is a stream-based wrapper around the Redis protocol. It's actually an extremely lightweight module, but the author has included tests and some interesting examples. The standard Node stream methods work, so data can be piped:

var Redis = require('redis-stream')
  , client = new Redis(6379, localhost, 0)
  , rpop = client.stream('rpop');


This doesn't just apply to rpop, other Redis commands will also work in a similar way.


DataGen (GitHub: cliffano / datagen, License: MIT, npm: datagen) by Cliffano Subagio is a multi-process test data file generator. It can be used to generate files in various formats, including CSV and JSON, based on template files that describe the output. Random numbers, dates, and strings can be generated.

The underlying random data generation is based on the Faker library, and Mocha tests are included.


Cushion (GitHub: Zoddy / cushion, License: MIT, npm: cushion) by André Kussmann is a CouchDB API. It has Node-friendly asynchronous wrappers around the usual CouchDB API methods, and it also supports low-level requests by calling cushion.request. Fetching documents returns a document object that can be modified and saved like this:

var doc = db.document('id');
doc.load(function(err, document) {
  document.body({ name: 'Quincy' });

Designs and users can also be fetched and manipulated.