title: How to access the functions and objects requireJS module
body: <p>I'm working on scripts for a site that uses requireJS and this weird syntax I've never seen before. </p>
  
  <pre><code>define("app/models/UserModel", ["backbone", "lang/Lang"], function (e, t) {
      var n = e.Model.extend({
          defaults: {
              item: "",
              these: "",
              arent: "",
              important: "en",
              relationship: 0,
              _position: {
                  c: 0,
                  r: 0
              }
          },
          hasPermission: function (e) {
              return this.get("permission") &gt;= e
          },
          getTotalPoints: function () {
              return this.get("somestuff")
          }
      });
  </code></pre>
  
  <p>I've used require(["app/models/UserModel"]) to load the module and require("app/models/UserModel").default to try and load the object and the same method to try and use the functions but it just comes back saying they don't exist. I've been able to access the functions in another model the same way but with most of the others it doesn't work. </p>
  
  <p>Aside from that I am wondering if var n = e.Model.extend has anything to do with it. I can't understand what the function of that is.</p>