execute function while importing in ecmascript
<p>while normally importing module on older way we do it like</p>

<pre><code>var a =  require('a')
</code></pre>

<p>also if we are exporting function from  'a' module we can do it like</p>

<pre><code>var a =  require('a')();
</code></pre>

<p>but how can we do this in ecmascript
i tried</p>

<pre><code>import a from 'a'()
</code></pre>

<p>but it didn't work
also if i did like </p>

<pre><code>import a from 'a';
a =  a();
</code></pre>

<p>there is error like duplicate declaration
i am using babel transpiler preset of ecmascript2015</p>