title: Adding a Property to the Top-level Object in a Node Module
body: <p>In a node.js module a variable declaration stays private inside the module:</p>
  
  <p>var a = 'x';</p>
  
  <p>Let's say, I want to declare a number of variables in this manner. I cannot use the following code, because like this the variables become really global and visible in other modules as well:</p>
  
  <pre><code>var xs = ['a', 'b', 'c', 'd'];
  for (key in xs) {
    var value = xs[key];
    global[value] = 'x';
  }
  </code></pre>
  
  <p>Is there a way to do this just for the module? I need this because I am requiring a library ('gl-matrix'), which itself has several sub-objects I need to access in the module easily. I want to avoid:</p>
  
  <pre><code>var gl_matrix = require('gl-matrix');
  var vec2 = gl_matrix.vec2;
  var vec3 = gl_matrix.vec3;
  var mat3 = gl_matrix.mat3;
  [...]
  </code></pre>