Created
December 3, 2009 22:47
-
-
Save jherdman/248639 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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