UNPKG

react-shields.io

Version:

Shields.io for react component, Quality metadata badges for open source projects.

44 lines (32 loc) 1.9 kB
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; 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 { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } import Base from '../common/Base'; var Codacy = /*#__PURE__*/function (_Base) { _inherits(Codacy, _Base); var _super = _createSuper(Codacy); function Codacy(props) { var _this; _classCallCheck(this, Codacy); _this = _super.call(this, props, {}, { platform: 'coveralls' }); _this.getUrl = function () { var _this$state = _this.state, base = _this$state.base, platform = _this$state.platform, projectId = _this$state.projectId, branch = _this$state.branch; if (platform !== 'coveralls') return ''; if (branch) return [base, platform, projectId, branch].join('/'); return [base, 'codacy/coverage', projectId].join('/'); }; return _this; } return Codacy; }(Base); export { Codacy as default }; //# sourceMappingURL=Codacy.js.map