wikimedia/mediawiki-core

View on GitHub
resources/lib/fetch-polyfill/fetch.umd.js

Summary

Maintainability
D
2 days
Test Coverage

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

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
  (factory((global.WHATWGFetch = {})));
}(this, (function (exports) { 'use strict';
Severity: Major
Found in resources/lib/fetch-polyfill/fetch.umd.js - About 1 day to fix

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

      function Body() {
        this.bodyUsed = false;
    
        this._initBody = function(body) {
          /*
    Severity: Major
    Found in resources/lib/fetch-polyfill/fetch.umd.js - About 3 hrs to fix

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

        function fetch(input, init) {
          return new Promise(function(resolve, reject) {
            var request = new Request(input, init);
      
            if (request.signal && request.signal.aborted) {
      Severity: Major
      Found in resources/lib/fetch-polyfill/fetch.umd.js - About 3 hrs to fix

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

          function Request(input, options) {
            if (!(this instanceof Request)) {
              throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
            }
        
        
        Severity: Minor
        Found in resources/lib/fetch-polyfill/fetch.umd.js - About 1 hr to fix

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

              this._initBody = function(body) {
                /*
                  fetch-mock wraps the Response object in an ES6 Proxy to
                  provide useful test harness features such as flush. However, on
                  ES5 browsers without fetch or Proxy support pollyfills must be used;
          Severity: Minor
          Found in resources/lib/fetch-polyfill/fetch.umd.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status