Function _checkConvert
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
_checkConvert: function(new_values) {
if(!this.flagConvert) {
if(Math.abs(this.values.length - new_values.length) > 1) {
var tmp_values = new_values.join('').replace(AutoKana.kana_compacting_pattern, '').split('');
if(Math.abs(this.values.length - tmp_values.length) > 1) {
- 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 _toKatakana
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_toKatakana: function(src) {
if(this.options.katakana) {
var c, i, l, str;
str = "";
for(i=0,l=src.length; i<l; i++) {
- 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 _checkValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_checkValue: function() {
var new_input, new_values;
new_input = this.elName.value;
if(new_input == '') {
this._stateClear();
- 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 _removeString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_removeString: function(new_input) {
if(new_input.match(this.ignoreString)) {
return new_input.replace(this.ignoreString, '');
} else {
var i, l, ignoreArray, inputArray;
- 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 toggle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
toggle: function(event) {
var ev = event || window.event;
if(event) {
var el = event.target;
if(el.checked) {
- 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"