title: Avoid Redefinition of require()
body: <p>Lets consider a case where I would like to override the <code>require()</code> function but I want it to avoid further redefinition at some point. Consider the following scenario:</p>
  
  <pre><code>// I redefine require here
  var _require = require;
  require = function(){
     // some code to redefine original require
  }
  // After this redefinition shouldn't happen
  </code></pre>
  
  <p>I know that it is possible to "freeze" object's function using <code>Object.freeze(obj)</code> hence I'm not allowed to modify the object after the statement. But I couldn't find the equivalent of <code>Object.freeze()</code> for global/local functions like <code>require</code>.</p>