title: Create a class in NodeJS
body: <p>How can I create an array of my class? </p>
  
  <p>I see it something like this:</p>
  
  <p>in main.js</p>
  
  <pre><code>....
  mySuperClass = require('./mySuperClass.js');
  objArray = new Object();
  ...
  objArray["10"] = new mySuperClass(10);
  console.log(objArray["10"].getI);
  objArray["20"] = new mySuperClass(20);
  console.log(objArray["20"].getI);
  objArray["30"] = new mySuperClass(30);
  console.log(objArray["30"].getI);
  </code></pre>
  
  <p>in mySuperClass.js</p>
  
  <pre><code>var _i = 0;
  var mySuperClass = function(ar) {
  _i = ar;
  }
  
  mySuperClass.prototype.getI = function()
  {
    return _i
  }
  module.exports.create = function() {
    return new mySuperClass();
  }
  module.exports._class = mySuperClass;
  </code></pre>
  
  <p>After exec, I get an error</p>
  
  <blockquote>
    <p>TypeError: object is not a function
        at Object.CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)</p>
  </blockquote>
  
  <p>What I need to correct?</p>