@kitware/vtk.js
Version:
Visualization Toolkit for the Web
42 lines (31 loc) • 1.96 kB
JavaScript
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
import _createClass from '@babel/runtime/helpers/createClass';
import _get from '@babel/runtime/helpers/get';
import _inherits from '@babel/runtime/helpers/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper';
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/* eslint-disable prefer-rest-params */
var ClassHierarchy = /*#__PURE__*/function (_Array) {
_inherits(ClassHierarchy, _Array);
var _super = _createSuper(ClassHierarchy);
function ClassHierarchy() {
_classCallCheck(this, ClassHierarchy);
return _super.apply(this, arguments);
}
_createClass(ClassHierarchy, [{
key: "push",
value: function push() {
for (var i = 0; i < arguments.length; i++) {
if (!this.includes(arguments[i])) {
_get(_getPrototypeOf(ClassHierarchy.prototype), "push", this).call(this, arguments[i]);
}
}
return this.length;
}
}]);
return ClassHierarchy;
}( /*#__PURE__*/_wrapNativeSuper(Array));
export { ClassHierarchy as default };