title: Avoiding Multiple Copies of the IIFE Pattern
body: <p>I have seen the following IIFE pattern (Does it have a name?), which according to <a href="http://toddmotto.com/what-function-window-document-undefined-iife-really-means/" rel="nofollow">this</a> blog post protects against other plugins, improves minification and has a <strong>tiny</strong> performance benefit. I also personally added a namespace to the IIFE:</p>
  
  <pre><code>(function (MyNamespace, $, window, document, undefined) {
      "use strict";
  
      // My Code
  
  })(window.MyNamespace = window.MyNamespace || {}, window.jQuery, window, document);
  </code></pre>
  
  <p>I have seen this pattern used in every JavaScript file. What about after concatenation and minification? How can I ensure that my code is wrapped with only <strong>one</strong> of the above IIFE's? Do tools like NPM, Gulp/Grunt help in this regard? Is there a standard way of handling this scenario?</p>