benjamine/frame-channels

View on GitHub

Showing 97 of 165 total issues

Function 6 has a Cognitive Complexity of 856 (exceeds 5 allowed). Consider refactoring.
Open

},{}],6:[function(require,module,exports){
(function (Buffer){
(function (global, module) {

  var exports = module.exports;
Severity: Minor
Found in public/build/test-bundle.js - About 2 wks 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 2 has a Cognitive Complexity of 352 (exceeds 5 allowed). Consider refactoring.
Open

},{"./channel":8,"./channel-iframe":7,"./util/globals":10}],2:[function(require,module,exports){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
Severity: Minor
Found in public/build/test-bundle.js - About 1 wk 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 test-bundle.js has 2422 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
* mocha's bdd syntax is inspired in RSpec
*   please read: http://betterspecs.org/
*/
Severity: Major
Found in public/build/test-bundle.js - About 6 days to fix

    Function 2 has 925 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./channel":8,"./channel-iframe":7,"./util/globals":10}],2:[function(require,module,exports){
    /*!
     * The buffer module from node.js, for the browser.
     *
     * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
    Severity: Major
    Found in public/build/test-bundle.js - About 4 days to fix

      Function 6 has 808 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],6:[function(require,module,exports){
      (function (Buffer){
      (function (global, module) {
      
        var exports = module.exports;
      Severity: Major
      Found in public/build/test-bundle.js - About 4 days to fix

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

        },{}],5:[function(require,module,exports){
        // Copyright Joyent, Inc. and other Node contributors.
        //
        // Permission is hereby granted, free of charge, to any person obtaining a
        // copy of this software and associated documentation files (the
        Severity: Minor
        Found in public/build/test-bundle.js - About 2 days 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 frame-channels.js has 811 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.frameChannels=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
        (function (process){
        
        // global exports
        
        
        Severity: Major
        Found in public/build/frame-channels.js - About 1 day to fix

          Function 4 has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],4:[function(require,module,exports){
          exports.read = function(buffer, offset, isLE, mLen, nBytes) {
            var e, m,
                eLen = nBytes * 8 - mLen - 1,
                eMax = (1 << eLen) - 1,
          Severity: Minor
          Found in public/build/test-bundle.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 5 has 211 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],5:[function(require,module,exports){
          // Copyright Joyent, Inc. and other Node contributors.
          //
          // Permission is hereby granted, free of charge, to any person obtaining a
          // copy of this software and associated documentation files (the
          Severity: Major
          Found in public/build/test-bundle.js - About 1 day to fix

            Function 14 has 205 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"es6-promise":3}],14:[function(require,module,exports){
            
            var Promise = require('es6-promise').Promise;
            var ChannelIFrame = require('./channel-iframe');
            var messageCount = 0;
            Severity: Major
            Found in public/build/frame-channels.js - About 1 day to fix

              Function 13 has 170 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],13:[function(require,module,exports){
              
              var Promise = require('es6-promise').Promise;
              
              function ChannelIFrame(channel){
              Severity: Major
              Found in public/build/frame-channels.js - About 6 hrs to fix

                Function 8 has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"./promise":8,"./utils":12}],8:[function(require,module,exports){
                "use strict";
                var config = require("./config").config;
                var configure = require("./config").configure;
                var objectOrFunction = require("./utils").objectOrFunction;
                Severity: Major
                Found in public/build/frame-channels.js - About 6 hrs to fix

                  Function json has 164 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var json = (function () {
                      "use strict";
                  
                      if ('object' == typeof JSON && JSON.parse && JSON.stringify) {
                        return {
                  Severity: Major
                  Found in public/build/test-bundle.js - About 6 hrs to fix

                    Function i has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function i (obj, showHidden, depth) {
                        var seen = [];
                    
                        function stylize (str) {
                          return str;
                    Severity: Major
                    Found in public/build/test-bundle.js - About 6 hrs to fix

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

                          function format (value, recurseTimes) {
                            // Provide a hook for user-specified inspect functions.
                            // Check that value is an object with an inspect function on it
                            if (value && typeof value.inspect === 'function' &&
                                // Filter out the util module, it's inspect function is special
                      Severity: Major
                      Found in public/build/test-bundle.js - About 5 hrs to fix

                        Function 7 has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"buffer":2}],7:[function(require,module,exports){
                        /*
                        * mocha's bdd syntax is inspired in RSpec
                        *   please read: http://betterspecs.org/
                        */
                        Severity: Major
                        Found in public/build/test-bundle.js - About 4 hrs to fix

                          Function 8 has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"./util/echo-iframe-channel":9,"./util/globals":10}],8:[function(require,module,exports){
                          /*
                          * mocha's bdd syntax is inspired in RSpec
                          *   please read: http://betterspecs.org/
                          */
                          Severity: Major
                          Found in public/build/test-bundle.js - About 4 hrs to fix

                            Function 3 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{"base64-js":3,"ieee754":4}],3:[function(require,module,exports){
                            var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
                            
                            ;(function (exports) {
                                'use strict';
                            Severity: Major
                            Found in public/build/test-bundle.js - About 3 hrs to fix

                              Function 4 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              },{}],4:[function(require,module,exports){
                              exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                                var e, m,
                                    eLen = nBytes * 8 - mLen - 1,
                                    eMax = (1 << eLen) - 1,
                              Severity: Major
                              Found in public/build/test-bundle.js - About 2 hrs to fix

                                Function str has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function str(key, holder) {
                                
                                  // Produce a string from holder[key].
                                
                                        var i,          // The loop counter.
                                Severity: Major
                                Found in public/build/test-bundle.js - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language