Skip to content

Instantly share code, notes, and snippets.

@odoe
Created October 20, 2011 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odoe/1301435 to your computer and use it in GitHub Desktop.
Save odoe/1301435 to your computer and use it in GitHub Desktop.
JavaScript shim for Node.js EventEmitter
var EXTENSION = require(__dirname + '/build/default/extension.node').EXTENSION;
var events = require('events');
inherits(EXTENSION, events.EventEmitter);
exports.EXTENSION = EXTENSION;
function inherits(target, source) {
for (var k in source.prototype) {
target.prototype[k] = source.prototype[k];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment