Nools, Procstreams, Kalendae

2012-03-12 00:00:00 +0000 by Alex R. Young


Nools (License: MIT, npm: nools) by Doug Martin is a rules engine. Rules are contained in "flows", and instances of flows are known as "sessions" -- these are used to add or retract facts from the engine:

var nools = require('nools')
  , session
  , message;

function Message(message) {
  this.message = message;

session = flow.getSession();
message = new Message('hello');

// Add the fact to the engine

// Change it
message.message = 'Bye';

// Remove it

For examples of how to define flows, have a look at the Nools readme.


Procstreams (License: MIT, npm: procstreams) by Marco Rogers is an attempt to create a more idiomatic JavaScript shell scripting API:

var $p = require('procstreams');
$p('cat lines.txt').pipe('wc -l')
  .data(function(stdout, stderr) {
      console.log(stdout); // prints number of lines in the file lines.txt

$p('mkdir foo')
  .and('cp file.txt foo/')
  .and('rm file.txt')
    .on('exit', function() {

As we've seen many times on DailyJS, chainable APIs offer an elegant solution to reducing unnecessary callbacks in asynchronous APIs, so this module is definitely appealing on that level.


Kalendae example screenshot

Kalendae (License: MIT) by Jarvis Badgley provides a date picker without any dependencies. There's a demo of Kalendae showing calendars instantiated with various options.

If jQuery is available, then a plugin will also be available through $(selector).kalendae(options).

The author has also provided a makefile that can build the project, minimise it, and run it through Google Closure.