title: Share prototype instance through requirejs without singelton pattern?
body: <p>I got a mediator object which handles sandboxes.</p>
  
  <p>Each sandbox has to register at the mediator. Because I also use requirejs this is a little problem because I have no idea how I could share the instance and not the prototype:</p>
  
  <p><strong>mediator.js</strong></p>
  
  <pre><code>define([], function() {
      var Mediator = function() {};
      Mediator.prototype.start = function() {};
      Mediator.prototype.stop = function() {};
      Mediator.prototype.register = function() {};
      Mediator.prototype.unregister = function() {};
      return Mediator;
  });
  </code></pre>
  
  <p><strong>sandbox_one.js</strong></p>
  
  <pre><code>define(['mediator'], function(Mediator) {
      var mediator = new Mediator();
      mediator.register('sandboxOne', SandboxObject);
  });
  </code></pre>
  
  <p><strong>sandbox_two.js</strong></p>
  
  <pre><code>define(['mediator'], function(Mediator) {
      var mediator = new Mediator();
      mediator.register('sandboxtwo', SandboxObject);
  });
  </code></pre>
  
  <p>As you have mentioned with the current approach I register the sandboxes at two different mediators. One idea to solve this would be the use of a singleton pattern but this conflicts with the architecture and requirejs recommandations..</p>
  
  <p><strong>So what other ways would I have to let the sandboxes register all to the same instance of Mediator?</strong></p>