You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Right now the following works:

    // the module
    exports = function () {
      console.log('I am the module');
    // the consumer
    var module = require('my-module');
    module(); // I am the module

    In fact I think even prefixing your module with var module=this; will work.

    But yes, I'll make sure that there's a modules variable - I've filed a bug


Avatar for Gordon @Gordon started