You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • It's worth noting that:

    Modules.addCached("Say",function() {
          function hello(name) {
            console.log('Hello',name);
          }
          exports.hello = hello;
    });
    

    and

    Modules.addCached("Say",`
          function hello(name) {
            console.log('Hello',name);
          }
          exports.hello = hello;
    `);
    

    are exactly the same code - so it's the same module pattern. It's just easier to write as a function because you don't get the acorn error and you also get syntax highlighting

About

Avatar for Gordon @Gordon started