Showing 5 of 5 total issues
Function exports
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
"use strict";
require('time-grunt')(grunt);
Function shallowSearch
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function shallowSearch(identifier, value, exitEarly) {
var current, memory = [];
if (!(value instanceof Array) && value.hasOwnProperty(identifier)) {
memory.push(value[identifier]);
Avoid deeply nested control flow statements. Open
Open
for (var prop in memory) {
if (memory.hasOwnProperty(prop)) {
result = result.concat(deepSearch(segment.identifier, memory[prop], exitEarly));
}
}
Avoid deeply nested control flow statements. Open
Open
if (current[j].hasOwnProperty(identifier)) {
memory.push(current[j][identifier]);
if (exitEarly) {
break outer;
}
Avoid deeply nested control flow statements. Open
Open
if (prop !== identifier && json[prop] !== null && typeof json[prop] === 'object') {
innerLoop(json[prop]);
}