Node Roundup: Stream Handbook, Screenshot as a Service, captchagen, Suppose

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

Stream Handbook

Stream Handbook by the venerable James Halliday is a guide to streams, a commonly overlooked feature of Node that's only just starting to get the attention it deserves.

So far James has written a solid introduction to streams, and he's working on adding more detailed coverage based on Node's related API methods and objects.

Screenshot as a Service

Screenshot as a Service (GitHub: fzaninotto / screenshot-as-a-service, License: MIT) by Francois Zaninotto is a fork of TJ Holowaychuk's screenshot-app, which is running at screenshot.etf1.fr. Since forking the app, Francois has worked on making it more robust. It can be used synchronously or asynchronously:

# Take a screenshot
GET /?url=www.google.com

# Asynchronous call
GET /?url=www.google.com&callback=http://www.myservice.com/screenshot/google



captchagen (License: MIT, npm: captchagen) from the team at Fractal is a CAPTCHA image generator. It can generate both a PNG and the corresponding audio through eSpeak.

Images are generated based on a custom algorithm and the Canvas module. Mocha tests have been included.


Suppose (GitHub: jprichardson / node-suppose, License: MIT, npm: suppose) by JP Richardson is a JavaScript version of Expect (man expect). It has a chainable API, so it's easy to create complex expectations with a familiar syntax:

suppose('npm', ['init'])
  .on(/name\: \([\w|\-]+\)[\s]*/).respond('awesome_package\n')
  .on('version: (0.0.0) ').respond('0.0.1\n')
  .on('description: ').respond("It's an awesome package man!\n")
  .on('entry point: (index.js) ').respond("\n")
  .on('test command: ').respond('npm test\n')
  .on('git repository: ').respond("\n")
  .on('keywords: ').respond('awesome, cool\n')
  .on('author: ').respond('JP Richardson\n')
  .on('license: (BSD) ').respond('MIT\n')
  .on('ok? (yes) ' ).respond('yes\n')

The author has included Mocha tests and examples in the readme file.