I wrote this ES6 code in BabelJS.io embedded editor:
import { getNum } from './counter.js';
getNum(1)
And babel transpiles the above code into:
'use strict';
var _counter = require('./counter.js');
(0, _counter.getNum)(1);
Everything is clear except the last line (0, _counter.getNum)(1)
, I want to understand what it is, and how does it work to comply with the according ES6 code?