Showing 17 of 26 total issues
Function ExpanderDevice
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ExpanderDevice = /*#__PURE__*/function () {
/**
* Construct a PixelBlaxe Expander Device.
*
* @param {string} portName the name of the
Function ExpanderDevice
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
var ExpanderDevice = /*#__PURE__*/function () {
/**
* Construct a PixelBlaxe Expander Device.
*
* @param {string} portName the name of the
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PBXMessage
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PBXMessage = /*#__PURE__*/function () {
_createClass(PBXMessage, null, [{
key: "baseSize",
value: function baseSize(type) {
switch (type) {
Function PBXCrc
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PBXCrc = /*#__PURE__*/function () {
function PBXCrc() {
_classCallCheck(this, PBXCrc);
this.reset();
Function ExpanderDevice
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ExpanderDevice(portName, options) {
var _this = this;
_classCallCheck(this, ExpanderDevice);
Function PBXMessage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
var PBXMessage = /*#__PURE__*/function () {
_createClass(PBXMessage, null, [{
key: "baseSize",
value: function baseSize(type) {
switch (type) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PBXDataMessage
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PBXDataMessage = /*#__PURE__*/function (_PBXMessage2) {
_inherits(PBXDataMessage, _PBXMessage2);
var _super2 = _createSuper(PBXDataMessage);
Function PBXHeader
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PBXHeader = /*#__PURE__*/function () {
function PBXHeader(channel, recordType) {
_classCallCheck(this, PBXHeader);
if (channel >= _constants.CHANNEL_MAX) {
Function PBColorOrder
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PBColorOrder = /*#__PURE__*/function () {
function PBColorOrder() {
var _this = this;
_classCallCheck(this, PBColorOrder);
Function PBColorOrder
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var PBColorOrder = /*#__PURE__*/function () {
function PBColorOrder() {
var _this = this;
_classCallCheck(this, PBColorOrder);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PBXCrc
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var PBXCrc = /*#__PURE__*/function () {
function PBXCrc() {
_classCallCheck(this, PBXCrc);
this.reset();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PBXHeader
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var PBXHeader = /*#__PURE__*/function () {
function PBXHeader(channel, recordType) {
_classCallCheck(this, PBXHeader);
if (channel >= _constants.CHANNEL_MAX) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _iterableToArrayLimit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _typeof
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _objectSpread
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _unsupportedIterableToArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this function. Open
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; } }