lib/utils/resolveObject.js
Function traverseObj
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
function traverseObj(obj) {
var key;
for (key in obj) {
// We want to check for ignoredKeys, this is to
- 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 compile_value
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function compile_value(value, stack) {
var to_ret, ref;
// Replace the reference inline, but don't replace the whole string because
Function selfRef
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function selfRef(str, obj) {
var i,
ref=obj,
array = str.split(options.separator),
context = current_context.join(options.separator);
- 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"