Is it possible to have variables visible "only to modules" and its extensions?
<p>Say I have the following modules, split across multiple files both capable of <em>extending</em> <code>skillet</code>:</p>

<p><strong>File1.js:</strong></p>

<pre><code>(function(){
 var privateVar1 = 0;

 var privateFunction1 = function() {
  //function definiton
 };

 skillet.fry() = function() {
  //fry it
  //matchbox.light();
 };

})(window.skillet = window.skillet || {});
</code></pre>

<p><strong>File2.js:</strong></p>

<pre><code>(function(){
 var privateVar2 = 0;

 var privateFunction2 = function() {
  //some private function 
 };

 skillet.grillIt = function() {
  //grill It
  //matchbox.strike(); &lt;-- Shared with File1.js
 };

})(window.skillet = window.skillet || {});
</code></pre>

<p>Is it possible to have a shared variable/object like <code>matchbox</code> be sharable by the two modules <strong>without</strong> being bound to <code>window.matchbox</code> or <code>window.skillet.matchbox</code>? I.e. the <em>visibility</em> of <code>matchbox</code> should only be to File1.js and File2.js and must not be accessible elsewhere. I doubt if it's possible, but is there a way to achieve such a behavior in JavaScript? If not, what's the best practice to use in this regard?</p>

<p>(It's more like having a shared <em>event-bus</em> among a set of related modules without exposing that bus globally)</p>
