Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Created November 17, 2011 03:44
Show Gist options
  • Save michaelsbradleyjr/1372316 to your computer and use it in GitHub Desktop.
Save michaelsbradleyjr/1372316 to your computer and use it in GitHub Desktop.
// CoffeeScript version
EventEmitter = (require 'events').EventEmitter
class Client extends EventEmitter
// JavaScript version (above code compiled with `coffee -bc <file>`
var Client, EventEmitter;
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
EventEmitter = (require('events')).EventEmitter;
Client = (function() {
__extends(Client, EventEmitter);
function Client() {
Client.__super__.constructor.apply(this, arguments);
}
return Client;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment