bq/corbel-js

View on GitHub
src/request.js

Summary

Maintainability
C
1 day
Test Coverage

File request.js has 316 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//@exclude
'use strict';
//@endexclude

(function () {
Severity: Minor
Found in src/request.js - About 3 hrs to fix

    Function _browserAjax has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      request._browserAjax = function (params, resolver) {
        var httpReq = new XMLHttpRequest();
    
        httpReq.open(params.method, params.url, true);
    
    
    Severity: Minor
    Found in src/request.js - About 1 hr to fix

      Function send has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        request.send = function (options, driver) {
          options = options || {};
          var module = this;
      
          if (!options.url) {
      Severity: Minor
      Found in src/request.js - About 1 hr to fix

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

          var processResponse = function (response, resolver, callbackSuccess, callbackError) {
        
            //xhr = xhr.target || xhr || {};
            var statusCode = xhrSuccessStatus[response.status] || response.status,
              statusType = Number(response.status.toString()[0]),
        Severity: Minor
        Found in src/request.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status