Closed Raynos closed 12 years ago
Hm, I'm not sure that's entirely within spec. That said, it should be straightforward to change as googling around reveals you are right about people using it. Will try to get out a patch later.
https://github.com/joyent/node/blob/master/lib/module.js#L39
It's in the code.
if (typeof module !== "undefined" && module.exports) {
fails. Also
module.exports.foo = ...
fails becausemodule.exports
is not set.Some people use
module.exports.foo = ...
instead ofexports.foo = ...