benjamine/frame-channels

View on GitHub

Showing 97 of 165 total issues

Function objEquiv has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function objEquiv (a, b) {
    if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
      return false;
    // an identical "prototype" property.
    if (a.prototype !== b.prototype) return false;
Severity: Minor
Found in public/build/test-bundle.js - About 1 hr to fix

    Function 11 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"expect.js":6}],11:[function(require,module,exports){
    
    var EventEmitter = require('events').EventEmitter;
    
    var instanceCount = 0;
    Severity: Minor
    Found in public/build/test-bundle.js - About 1 hr to fix

      Function waitMessageResponse has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function waitMessageResponse(self, id, timeout, resolve, reject) {
      
        var _myWindow = self.findMyWindow();
      
        var listener = function responseListener(event) {
      Severity: Minor
      Found in src/channel.js - About 1 hr to fix

        Function create has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function create(options) {
          // create echo src-less iframe to talk to
          var iframeHtml;
          options = options || {};
          if (!options.id) {
        Severity: Minor
        Found in public/build/test-bundle.js - About 1 hr to fix

          Function waitMessageResponse has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function waitMessageResponse(self, id, timeout, resolve, reject) {
          
            var _myWindow = self.findMyWindow();
          
            var listener = function responseListener(event) {
          Severity: Minor
          Found in public/build/frame-channels.js - About 1 hr to fix

            Function handleThenable has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function handleThenable(promise, value) {
              var then = null,
              resolved;
            
              try {
            Severity: Minor
            Found in public/build/frame-channels.js - About 1 hr to fix

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

              },{}],7:[function(require,module,exports){
              (function (global){
              "use strict";
              /*global self*/
              var RSVPPromise = require("./promise").Promise;
              Severity: Minor
              Found in public/build/frame-channels.js - About 1 hr to fix

                Function keys has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Assertion.prototype.keys = function ($keys) {
                    var str
                      , ok = true;
                
                    $keys = isArray($keys)
                Severity: Minor
                Found in public/build/test-bundle.js - About 1 hr to fix

                  Function uint8ToBase64 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function uint8ToBase64 (uint8) {
                          var i,
                              extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
                              output = "",
                              temp, length
                  Severity: Minor
                  Found in public/build/test-bundle.js - About 1 hr to fix

                    Function all has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function all(promises) {
                      /*jshint validthis:true */
                      var Promise = this;
                    
                      if (!isArray(promises)) {
                    Severity: Minor
                    Found in public/build/frame-channels.js - About 1 hr to fix

                      Function reduce has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function reduce (arr, fun) {
                          if (Array.prototype.reduce) {
                            return Array.prototype.reduce.apply(
                                arr
                              , Array.prototype.slice.call(arguments, 1)
                      Severity: Minor
                      Found in public/build/test-bundle.js - About 1 hr to fix

                        Function slice has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Buffer.prototype.slice = function (start, end) {
                          var len = this.length
                          start = ~~start
                          end = end === undefined ? len : ~~end
                        
                        
                        Severity: Minor
                        Found in public/build/test-bundle.js - About 1 hr to fix

                          Function nextTick has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          process.nextTick = (function () {
                              var canSetImmediate = typeof window !== 'undefined'
                              && window.setImmediate;
                              var canPost = typeof window !== 'undefined'
                              && window.postMessage && window.addEventListener
                          Severity: Minor
                          Found in public/build/frame-channels.js - About 1 hr to fix

                            Function byteLength has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Buffer.byteLength = function (str, encoding) {
                              var ret
                              str = str.toString()
                              switch (encoding || 'utf8') {
                                case 'hex':
                            Severity: Minor
                            Found in public/build/test-bundle.js - About 1 hr to fix

                              Function removeAllListeners has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              EventEmitter.prototype.removeAllListeners = function(type) {
                                var key, listeners;
                              
                                if (!this._events)
                                  return this;
                              Severity: Minor
                              Found in public/build/test-bundle.js - About 1 hr to fix

                                Function readUInt32 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function readUInt32 (buf, offset, littleEndian, noAssert) {
                                  if (!noAssert) {
                                    assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
                                    assert(offset !== undefined && offset !== null, 'missing offset')
                                    assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
                                Severity: Minor
                                Found in public/build/test-bundle.js - About 1 hr to fix

                                  Function b64ToByteArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function b64ToByteArray (b64) {
                                          var i, j, l, tmp, placeHolders, arr
                                  
                                          if (b64.length % 4 > 0) {
                                              throw new Error('Invalid string. Length must be a multiple of 4')
                                  Severity: Minor
                                  Found in public/build/test-bundle.js - About 1 hr to fix

                                    Function read has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                                      var e, m,
                                          eLen = nBytes * 8 - mLen - 1,
                                          eMax = (1 << eLen) - 1,
                                          eBias = eMax >> 1,
                                    Severity: Minor
                                    Found in public/build/test-bundle.js - About 1 hr to fix

                                      Function subscribe has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      Channel.prototype.subscribe = function (handler) {
                                        if (typeof handler !== 'function') {
                                          throw new Error('handler function is required');
                                        }
                                        this.handlers.push(handler);
                                      Severity: Minor
                                      Found in public/build/frame-channels.js - About 1 hr to fix

                                        Function subscribe has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        Channel.prototype.subscribe = function (handler) {
                                          if (typeof handler !== 'function') {
                                            throw new Error('handler function is required');
                                          }
                                          this.handlers.push(handler);
                                        Severity: Minor
                                        Found in src/channel.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language