title: How to make the node.js require function in pure JavaScript
body: <p>How can I make the node.js <code>require</code> function in pure JavaScript? I have searched the web for any solutions but I have found none.</p>
  
  <p>Something along the lines of this:</p>
  
  <pre><code>function require(path){
      //Code
      return data;
  }
  </code></pre>
  
  <p>Some of the posts I have already seen:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/9475792/how-does-require-in-node-js-work">How does require() in node.js work?</a></li>
  <li><a href="https://stackoverflow.com/questions/7367850/node-js-require-function-and-parameters">Node.js &quot;require&quot; function and parameters</a></li>
  </ul>