Showing 9 of 9 total issues
Function exports
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(dictionary, truth_fn, truth_tbl, current) {
this.dictionary = dictionary
this.truth_fn = truth_fn
this.truth_tbl = truth_tbl
this.current = current || {}
- 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 exports
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(dictionary, truth_fn, truth_tbl, current) {
this.dictionary = dictionary
this.truth_fn = truth_fn
this.truth_tbl = truth_tbl
this.current = current || {}
Function exports
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(dictionary, json_data, truth_tbl, discarded) {
var output = {}
discarded = discarded || []
- 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 get
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.get = function(key, value) {
var read = that.dictionary[key]
if (!read || value === null || value === 'undefined') {
return {}
Function exports
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(filename, log, encoding) {
encoding = encoding || 'utf8'
var data = {}
Function eval
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
eval: function(__current__, value) {
if (value[0] === 0 || value === 0) {
return {}
}
- 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 eval
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
eval: function(__current__, value) {
var result = true
var verb = 'require'
var obj = {}
- 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 eval
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
eval: function(__current__, value) {
if (value[0] === 0 || value === 0) {
return {}
}
- 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 truthy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
truthy: function(__current__, value) {
if (value === 'all' || value === true) {
return [2, 'always']
}
- 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"