multiplex/multiplex.js

View on GitHub

Showing 109 of 109 total issues

File multiplex.d.ts has 436 lines of code (exceeds 250 allowed). Consider refactoring.
Open

declare var multiplex: multiplex.MultiplexStatic;


// Support AMD require
declare module 'multiplex' {
Severity: Minor
Found in src/typings/multiplex.d.ts - About 6 hrs to fix

    `` has 43 functions (exceeds 20 allowed). Consider refactoring.
    Open

        mixin(iterable.prototype, {
    
            /**
            * Applies an accumulator function over a sequence.
            * @param {Object} seed The initial accumulator value.
    Severity: Minor
    Found in src/lib/linq/_linq.js - About 5 hrs to fix

      Function linq has 143 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function linq(iterable) {
          mixin(iterable, {
      
              /**
              * Returns an empty Iterable.
      Severity: Major
      Found in src/lib/linq/_linq.js - About 5 hrs to fix

        Function quickSort has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            quickSort: function (map, left, right) {
                do {
                    var i = left,
                        j = right,
                        x = map[i + ((j - i) >> 1)];
        Severity: Minor
        Found in src/lib/collections/ordered-iterable.js - About 4 hrs 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 exports has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function (grunt) {
            'use strict';
        
            var rollup = require('rollup'),
                path = require('path'),
        Severity: Major
        Found in tasks/build.js - About 3 hrs to fix

          `` has 29 functions (exceeds 20 allowed). Consider refactoring.
          Open

          extend(List, Collection, {
              /**
              * Adds an object to the end of the List.
              * @param {Object} item The object to be added to the end of the List.
              */
          Severity: Minor
          Found in src/lib/collections/list.js - About 3 hrs to fix

            Function compare has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            export default function compare(objA, objB) {
                // Identical objects
                if (objA === objB) {
                    return 0;
                }
            Severity: Minor
            Found in src/lib/runtime/compare.js - About 3 hrs 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

            File hash-set.js has 289 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import Collection from './collection';
            import HashTable, { HashTableIterator } from './hash-table';
            import EqulityComparer from './equality-comparer';
            import assertType from '../utils/assert-type';
            import assertNotNull from '../utils/assert-not-null';
            Severity: Minor
            Found in src/lib/collections/hash-set.js - About 2 hrs to fix

              Function findLast has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                  findLast: function (value) {
                      if (this.head === null) {
                          return null;
                      }
              
              
              Severity: Minor
              Found in src/lib/collections/linked-list.js - About 2 hrs 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 exports has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function (grunt) {
                  'use strict';
              
                  var path = require('path'),
                      dirs = grunt.config('dirs'),
              Severity: Major
              Found in tasks/uglify.js - About 2 hrs to fix

                File list.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import Collection from './collection';
                import ReadOnlyCollection from './read-only-collection';
                import ArrayIterator from '../iteration/iterator-array';
                import Comparer from './comparer';
                
                
                Severity: Minor
                Found in src/lib/collections/list.js - About 2 hrs to fix

                  Function find has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                      find: function (value) {
                          var node = this.head;
                  
                          if (node !== null) {
                              if (value !== null) {
                  Severity: Minor
                  Found in src/lib/collections/linked-list.js - About 2 hrs 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 equals has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export default function equals(objA, objB, strict) {
                      // Objects are identical
                      if (objA === objB) {
                          return true;
                      }
                  Severity: Minor
                  Found in src/lib/runtime/equals.js - About 2 hrs 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 hash has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export default function hash(obj, strict) {
                      // null/undefined hash is 0
                      if (obj === null || obj === undefined) {
                          return 0;
                      }
                  Severity: Minor
                  Found in src/lib/runtime/hash.js - About 2 hrs 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

                  File linked-list.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import Collection from './collection';
                  import Iterator from '../iteration/iterator';
                  import LinkedListNode from './linked-list-node';
                  import forOf from '../utils/for-of';
                  import assertType from '../utils/assert-type';
                  Severity: Minor
                  Found in src/lib/collections/linked-list.js - About 2 hrs to fix

                    Function minMaxIterator has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function minMaxIterator(source, max, selector) {
                        assertNotNull(source);
                    
                        if (selector) {
                            assertType(selector, Function);
                    Severity: Minor
                    Found in src/lib/linq/min-max.js - About 2 hrs 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 exports has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function (grunt) {
                        'use strict';
                    
                        var pkg = grunt.file.readJSON('package.json'),
                            dirs = {
                    Severity: Minor
                    Found in Gruntfile.js - About 1 hr to fix

                      Function intersectWith has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          intersectWith: function (other) {
                              assertNotNull(other);
                      
                              // intersection of anything with empty set is empty set, so return if count is 0
                              if (this.count() === 0) {
                      Severity: Minor
                      Found in src/lib/collections/hash-set.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 minMaxIterator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function minMaxIterator(source, max, selector) {
                          assertNotNull(source);
                      
                          if (selector) {
                              assertType(selector, Function);
                      Severity: Minor
                      Found in src/lib/linq/min-max.js - About 1 hr to fix

                        Function exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function (grunt) {
                            'use strict';
                        
                            var dirs = grunt.config('dirs'),
                                files = grunt.config('files'),
                        Severity: Minor
                        Found in tasks/copy.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language