Showing 8 of 16 total issues
Function Bolgia
has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.Bolgia = ( function () {
var isArray = Array.isArray
, slice = Array.prototype.slice
, otype = Object.prototype.toString
, abs = Math.abs
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Bolgia
has 357 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.Bolgia = ( function () {
var isArray = Array.isArray
, slice = Array.prototype.slice
, otype = Object.prototype.toString
, abs = Math.abs
File bolgia.js
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Bolgia, an helper module for the config hell.
* It recursively clones, mixes, updates and improves configuration
* objects/hashes with nested properties.
* '..non ragioniam di lor, ma guarda e passa..' ",
Function toHash
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, toHash = function ( arr, recur, obj, convert ) {
var h = obj || {}
, c = convert
, a = isArray( arr ) ? arr : []
, alen = a.length
Function update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, update = function ( dest, src ) {
var d = dest
, s = src
, sector = s && s.constructor || {}
, doctor = d && d.constructor
Function improve
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, improve = function ( dest, src ) {
var d = dest
, s = src
, ctor = s && s.constructor || {}
, stype = otype.call( s )
Function qs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, qs = function ( field, value, opt, hash ) {
var cfg = opt
, f = field
, h = hash || ''
, v = value
Function flatten
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, flatten = function ( field, value, hash ) {
var f = field
, h = hash || {}
, v = value
, vtype = otype.call( v )