In babeljs v6.5.1,
class Foo {}
compiles to
"use strict";
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Foo = function Foo() {
(0, _classCallCheck3.default)(this, Foo);
};
What's the point of the 0 in (0, _classCallCheck3.default)(this, Foo);?
In the online babeljs repl, which probably has a different babeljs version, that line is simply _classCallCheck(this, Foo);, and they seem to do the same thing. What's the difference between these two statements?