src/services/utilsService.js
Function utilService
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var utilService = function() {
var utils = {};
/**
Function groupBy
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
utils.groupBy = function(arrayOfObjects, propToGroupBy) {
var groupArray = [],
match;
var newGroup = function(initObj, groupProp) {
Avoid deeply nested control flow statements. Open
Open
if (groupArray[j].name === arrayOfObjects[i][propToGroupBy]) {
groupArray[j].members.push(arrayOfObjects[i]);
match = true;
break;
}