Showing 4 of 6 total issues
Function getFavoriteTerms
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
groucho.getFavoriteTerms = function (vocab, returnAll, threshold) {
var results = groucho.getActivities('browsing'),
termProp = groucho.config.taxonomyProperty,
pages = [],
returnTerms = {},
Function getActivities
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
groucho.getActivities = function (group) {
var results = groucho.storage.index(),
returnVals = [],
matchable = (group) ? new RegExp("^track." + group + ".", "g") : false,
record;
Avoid deeply nested control flow statements. Open
Open
if (results[i][termProp].hasOwnProperty(vocab)) {
collectTerms(vocab, i);
}
Avoid deeply nested control flow statements. Open
Open
for (vocName in results[i][termProp]) {
collectTerms(vocName, i);
}