Skip to content

Instantly share code, notes, and snippets.

@laduke
Created March 9, 2011 01:50
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 laduke/861540 to your computer and use it in GitHub Desktop.
Save laduke/861540 to your computer and use it in GitHub Desktop.
function MyModule() {
if(false === (this instanceof MyModule)) {
return new MyModule();
}
events.EventEmitter.call(this);
}
sys.inherits(MyModule, events.EventEmitter);
MyModule.prototype.some_states = {};
some_function() = {
MyModule.some_states[foo] = "bar";
//obviously this doesn't work, but what do I do?
}
module.exports = MyModule;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment