Skip to content

Instantly share code, notes, and snippets.

@odoe

odoe/shimexample.js

Created Oct 20, 2011
Embed
What would you like to do?
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