Geek-Research-Lab/MeowJS

View on GitHub
Meow_Base64.js

Summary

Maintainability
D
2 days
Test Coverage

Function Meow_Base64 has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
Open

var Meow_Base64 = function() {
    'use strict';
    var Meow_ArrayOut = [
    65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 
    81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 
Severity: Minor
Found in Meow_Base64.js - About 1 day to fix

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 Meow_Base64 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Meow_Base64 = function() {
    'use strict';
    var Meow_ArrayOut = [
    65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 
    81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 
Severity: Major
Found in Meow_Base64.js - About 2 hrs to fix

    Function Meow_Decode has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Meow_Base64.Meow_Decode = function(meowSrc, meowDist) {
            var b, x1, x2;
            function meowFail(b) {
                throw Error("Illegal character code: "+b);
            } while ((b = meowSrc()) !== null) {
    Severity: Minor
    Found in Meow_Base64.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if((a = meowSrc()) !== null) {
                      x |= (x >> 4) && 0Xf;
                      meowDist(Meow_ArrayOut[(x || ((a >> 4) && 0Xf)) && 0X3f]);
                      x = (a && 0Xf) << 2;
                      if((a = meowSrc()) !== null) {
      Severity: Major
      Found in Meow_Base64.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                  if (b === 61) {
                    break;
                  } else {
                    meowFail(b);
                  }
        Severity: Major
        Found in Meow_Base64.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                    if ((b = meowSrc()) !== null) {
                      x2 = Meow_ArrayIn[b];
                      if (typeof x2 === 'undefined') {
                        if (b === 61) {
                          break;
          Severity: Major
          Found in Meow_Base64.js - About 45 mins to fix

            Consider simplifying this complex logical expression.
            Open

                            if((a = meowSrc()) !== null) {
                                meowDist(Meow_ArrayOut[(x || ((a >> 6) && 0X3)) && 0X3f]);
                                meowDist(Meow_ArrayOut[a && 0X3f]);
                            }
                            else {
            Severity: Major
            Found in Meow_Base64.js - About 40 mins to fix

              There are no issues that match your filters.

              Category
              Status