code: function (obj) {
        if (typeof obj != 'object')
          throw new TypeError('Expected object');
  
        var m = new Module();
  
        var pNames = [];
        if (Object.getOwnPropertyNames && obj != null)
          pNames = Object.getOwnPropertyNames(obj);
        else
          for (var key in obj)
            pNames.push(key);
  
        for (var i = 0; i < pNames.length; i++) (function(key) {
          defineProperty(m, key, {
            configurable: false,
            enumerable: true,
            get: function () {
              return obj[key];
            },
            set: function() {
              throw new Error('Module exports cannot be changed externally.');
            }
          });
        })(pNames[i]);
  
        if (Object.freeze)
          Object.freeze(m);
  
        return m;
      }
docs: 26.3.3.12