code: function (obj) {
          if (typeof obj != 'object')
            throw new TypeError('Expected object');
  
          // we do this to be able to tell if a module is a module privately in ES5
          // by doing m instanceof Module
          var m = new Module();
  
          for (var key in obj) {
            (function (key) {
              defineProperty(m, key, {
                configurable: false,
                enumerable: true,
                get: function () {
                  return obj[key];
                }
              });
            })(key);
          }
  
          if (Object.preventExtensions)
            Object.preventExtensions(m);
  
          return m;
        }
docs: 26.3.3.12