Skip to content

Instantly share code, notes, and snippets.

@jherdman
Created December 3, 2009 22:47
Show Gist options
  • Save jherdman/248639 to your computer and use it in GitHub Desktop.
Save jherdman/248639 to your computer and use it in GitHub Desktop.
// e.g....
var MyObject = exports.MyObject = function () {
this.my_attr = "I'm an attribute!";
}
// I expected to do this...
var MyObject = require('my_object');
var my_instance = new MyObject(); // EXPLOSIONS!!!
// And in reality, it's this
var my_ext = require('my_object');
var my_instance = new my_ext.MyObject();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment