Showing 28 of 48 total issues
Function bubbling
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bubbling(nodeSet) {
const begining = nodeSet.options('begining');
const ending = nodeSet.options('ending');
const separator = nodeSet.options('separator');
const tokenizer = nodeSet.options('tokenizer');
Function range
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function range(node) {
if (!bubble.isBubbleNode(node)) {
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 onMousemove
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onMousemove(dragSet) {
const drag = dragSet.__drag__;
if (!drag) {
return;
}
Function range
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function range(node) {
if (!bubble.isBubbleNode(node)) {
return;
}
Function exports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (event, sharedData) {
const nodeEditor = sharedData.nodeEditor;
const nodeBubble = sharedData.nodeBubble;
const isDblclick = sharedData.isDblclick;
- 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 onMouseup
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onMouseup(dragSet, event) {
const drag = dragSet.__drag__;
if (!drag) {
return;
}
Function onMouseup
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function onMouseup(dragSet, event) {
const drag = dragSet.__drag__;
if (!drag) {
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 exports
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (event) {
const code = events.keyCode(event);
const nodeEditor = event.currentTarget;
if (code === KEY.Enter) {
- 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 onMousemove
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function onMousemove(dragSet) {
const drag = dragSet.__drag__;
if (!drag) {
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 getBubbleRanges
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function getBubbleRanges(nodeSet) {
const ranges = [];
const children = nodeSet.childNodes;
let range;
let node;
- 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 ready
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.ready = (function () {
let elements = [];
let ready = false;
let lock = false;
Function edit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function edit(nodeSet, nodeBubble) {
if (nodeBubble.hasAttribute('readonly')) {
return false;
}
Function exports
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (event, sharedData) {
const nodeEditor = sharedData.nodeEditor;
const nodeBubble = sharedData.nodeBubble;
const isDblclick = sharedData.isDblclick;
- 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 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (event, sharedData) {
const code = events.keyCode(event);
const metaKey = events.metaKey(event);
switch (code) {
Function create
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function create(nodeEditor, dataText, dataAttributes = {}) {
dataText = text.textClean(dataText);
if (!dataText) {
return;
Function onMousedown
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onMousedown(event) {
const nodeBubble = bubbleset.closestNodeBubble(event.target);
if (!nodeBubble) {
return;
}
Function reg
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
reg: function (value) {
const type = typeof value;
switch (type) {
case 'string':
if (value) {
- 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 findBubbleLeft
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function findBubbleLeft(selection) {
if (!selection.focusNode || !selection.anchorNode) {
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 findBubbleRight
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function findBubbleRight(selection) {
if (!selection.focusNode || !selection.anchorNode) {
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 toggleEvent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function toggleEvent(element, eventName, userCallback, isSet = true, isLocal = false, isOne = false) {