Node Roundup: Node 0.4.3, npm 1.0, Geo, MicroEvent

2011-03-23 00:00:00 +0000 by Alex R. Young

Node 0.4.3

Node 0.4.3 is out, which has some interesting changes:

npm 1.0

Isaac Schlueter has been working on npm 1.0, and I noticed he's written
an interesting about about 1.0's ls command for the Node
blog: npm 1.0: The New
. It's now at
release candidate stage, and there's a lot of activity going on over at
isaacs/npm on GitHub.


Geo for Node.js (GitHub: feliperazeek/geonode) by Felipe Oliveira is a geocoding library that uses Google's Geocode API
for geocoding, and GeoHash for GeoSpatial support.

var geo = require('geo'),
    sensor = false,
    address = '221B Baker Street, London, UK';

geo.geocoder(geo.google, address, sensor, function(formattedAddress, latitude, longitude) {
  console.log("Formatted Address: " + formattedAddress);
  console.log("Latitude: " + latitude);
  console.log("Longitude: " + longitude);

// Output:
// Formatted Address: 221 Baker St, Paddington, Greater London NW1 5, UK
// Latitude: 51.5231225
// Longitude: -0.1580078

Seems incredibly useful to me, assuming Google's terms let us use this
for something interesting!


MicroEvent.js by Jerome Etienne (GitHub: jeromeetienne /
) is a
tiny event emitter library for client-side code and Node. It uses the
observer pattern, like this:

var Ticker = function() {
  var self = this;
  setInterval(function() {
    // 'trigger' is provided by MicroEvent
    self.trigger('tick', new Date());
  }, 1000);

// You have to use this method to make your class MicroEvent-enabled:

var ticker = new Ticker();

// Now we can observe when the event fires
ticker.bind('tick', function(date) {
  console.log('notified date', date);