• Thank you very much for your quick response!

    Documentation wants me to write a module to storage in the following way:

    require('Storage').write('SmokeTest',`
      exports.getAnswer = function () { return 42; }
    `);
    

    i.e., obviously un-minified and not pre-tokenized.

    Could I use the following approach instead?

    let exports = {};
      exports.getAnswer = function () {
        for (let i = 0, j = 0; i < 1000; i++) {
          j++; // just consume some time...
        }
        return 42;
      };
    
    let ModuleSource = '';
      for (let Key in exports) {
        if (exports.hasOwnProperty(Key)) {
          ModuleSource += 'exports.' + Key + '=' + exports[Key] + ';';
        }
      }
    require('Storage').write('SmokeTest',Mod­uleSource);
    

    If I just print the contents of ModuleSource, I get

    exports.getAnswer=function () {for(let i=0,j=0;i<1000;i++){j++;}return 42;}
    

    which looks quite promising (in terms of minification, at least)...

About