title: Convert closure to es6 module
body: <p>I'm using a javascript build environment that supports es6 modules (<a href="https://github.com/esnext/es6-module-transpiler" rel="nofollow">using es6-module-transpiler</a>) so you can simply import stuff across different files.</p>
  
  <p>Now I got a third party library that I'd like to be "importable".</p>
  
  <p>The library populates its functionality like this:</p>
  
  <pre><code>(function () {/*...*/}).call(this);
  </code></pre>
  
  <p>Would it be safe to omit the closure and convert it to:</p>
  
  <pre><code>export default function () {/* ... */};
  </code></pre>
  
  <p>Or is there a better way? </p>
  
  <p>Thanks in advance!</p>