lexmihaylov/AsyncUtils

View on GitHub

Showing 10 of 12 total issues

Function Thread has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Thread = (function() {
    
    /**
     * a template function used to construct the webworker's content
     */
Severity: Major
Found in src/Thread.js - About 2 hrs to fix

    Function Loop has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Loop = (function() {
        /**
         * Async loop class that takes a handle as a parameter and a maximum number of iterations
         * @constructor
         * @param {Function} handle
    Severity: Major
    Found in src/Loop.js - About 2 hrs to fix

      Function List has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var List = (function() {
          /**
           * Async array usage
           * @class ListHandler
           * @param {Array} list
      Severity: Major
      Found in src/List.js - About 2 hrs to fix

        Function ListHandler has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var ListHandler = (function() {
                
                var ListHandler = function(list) {
                    this.list = list;
                };
        Severity: Major
        Found in src/List.js - About 2 hrs to fix

          Function If has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var If = (function() {
              /**
               * Proxy class for handling promises
               * @class ForkPromiseProxy
               */
          Severity: Minor
          Found in src/IfElse.js - About 1 hr to fix

            Function Loop has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            var Loop = (function() {
                /**
                 * Async loop class that takes a handle as a parameter and a maximum number of iterations
                 * @constructor
                 * @param {Function} handle
            Severity: Minor
            Found in src/Loop.js - About 1 hr 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 Thread has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            var Thread = (function() {
                
                /**
                 * a template function used to construct the webworker's content
                 */
            Severity: Minor
            Found in src/Thread.js - About 1 hr 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 ForkPromiseProxy has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var ForkPromiseProxy = (function() {
                    var ForkPromiseProxy = function(promise) {
                        this.promise = promise;
                        
                        this.thenHandle = function() {};
            Severity: Minor
            Found in src/IfElse.js - About 1 hr to fix

              Function If has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

              var If = (function() {
                  /**
                   * Proxy class for handling promises
                   * @class ForkPromiseProxy
                   */
              Severity: Minor
              Found in src/IfElse.js - About 55 mins 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 bind has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                Function.prototype.bind = function(oThis) {
                  if (typeof this !== 'function') {
                    // closest thing possible to the ECMAScript 5
                    // internal IsCallable function
                    throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
              Severity: Minor
              Found in src/bind-polyfill.js - About 35 mins 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

              Severity
              Category
              Status
              Source
              Language