Gandi/hieraviz

View on GitHub
app/public/js/fetch.js

Summary

Maintainability
C
1 day
Test Coverage

File fetch.js has 318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function() {
  'use strict';

  if (self.fetch) {
    return
Severity: Minor
Found in app/public/js/fetch.js - About 3 hrs to fix

    Function Body has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function Body() {
        this.bodyUsed = false
    
    
        this._initBody = function(body) {
    Severity: Major
    Found in app/public/js/fetch.js - About 2 hrs to fix

      Function fetch has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        self.fetch = function(input, init) {
          return new Promise(function(resolve, reject) {
            var request
            if (Request.prototype.isPrototypeOf(input) && !init) {
              request = input
      Severity: Minor
      Found in app/public/js/fetch.js - About 1 hr to fix

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

          function Request(input, options) {
            options = options || {}
            var body = options.body
            if (Request.prototype.isPrototypeOf(input)) {
              if (input.bodyUsed) {
        Severity: Minor
        Found in app/public/js/fetch.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status