Showing 4 of 4 total issues
File gulpfile.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* jshint node: true */
'use strict';
var _ = require('lodash');
var gulp = require('gulp');
Function match
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Path.match = function (path, parameterize) {
var params = {}, route = null, possible_routes, slice, i, j, compare;
for (route in Path.routes.defined) {
if (route !== null && route !== undefined) {
route = Path.routes.defined[route];
Avoid deeply nested control flow statements. Open
Open
if (parameterize) {
route.params = params;
}
Avoid deeply nested control flow statements. Open
Open
for (i = 0; i < slice.split("/").length; i+=1) {
if ((i < compare.split("/").length) && (slice.split("/")[i].charAt(0) === ":")) {
params[slice.split('/')[i].replace(/:/, '')] = compare.split("/")[i];
compare = compare.replace(compare.split("/")[i], slice.split("/")[i]);
}