yadaguru/yadaguru-app

View on GitHub
src/services/utilsService.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function utilService has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var utilService = function() {

    var utils = {};

    /**
Severity: Major
Found in src/services/utilsService.js - About 3 hrs to fix

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

        utils.groupBy = function(arrayOfObjects, propToGroupBy) {
          var groupArray = [],
              match;
    
          var newGroup = function(initObj, groupProp) {
    Severity: Minor
    Found in src/services/utilsService.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                    if (groupArray[j].name === arrayOfObjects[i][propToGroupBy]) {
                      groupArray[j].members.push(arrayOfObjects[i]);
                      match = true;
                      break;
                    }
      Severity: Major
      Found in src/services/utilsService.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status