Showing 20 of 20 total issues
Function set
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
set: (v) => {
if (!root._AnimationFrame) {
/**
* root._AnimationFrame was empty and can be set
*/
- Read upRead up
- Create a ticketCreate a ticket
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
File AnimationFrame.ts
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interfaces
*/
import IWindow from "../interfaces/IWindow";
- Create a ticketCreate a ticket
Function parallelWatch
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public parallelWatch(): void {
try {
/**
* If stack exist, it is an object and it is contains methods
*/
- Read upRead up
- Create a ticketCreate a ticket
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 set
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
set: (v) => {
if (!root._AnimationFrame) {
/**
* root._AnimationFrame was empty and can be set
*/
- Create a ticketCreate a ticket
Function serialWatch
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public serialWatch(): void {
try {
/**
* If stack exist, it is an object and it is contains methods
*/
- Read upRead up
- Create a ticketCreate a ticket
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 serialWatch
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public serialWatch(): void {
try {
/**
* If stack exist, it is an object and it is contains methods
*/
- Create a ticketCreate a ticket
Function parallelWatch
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public parallelWatch(): void {
try {
/**
* If stack exist, it is an object and it is contains methods
*/
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (root._oldAnimationFrame.parallelStack.hasOwnProperty(ID)) {
root._AnimationFrame.parallelSubscribe({
callback: root._oldAnimationFrame.parallelStack[ID].callback,
context: root._oldAnimationFrame.parallelStack[ID].context,
params: root._oldAnimationFrame.parallelStack[ID].params,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (const ID in root._oldAnimationFrame.stack) {
if (root._oldAnimationFrame.stack.hasOwnProperty(ID)) {
root._AnimationFrame.subscribe(
root._oldAnimationFrame.stack[ID].context,
root._oldAnimationFrame.stack[ID].callback,
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (root._oldAnimationFrame.serialStack.hasOwnProperty(ID)) {
root._AnimationFrame.serialSubscribe({
callback: root._oldAnimationFrame.serialStack[ID].callback,
context: root._oldAnimationFrame.serialStack[ID].context,
params: root._oldAnimationFrame.serialStack[ID].params,
- Create a ticketCreate a ticket
Function version_lt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function version_lt(v1, v2) {
if (
typeof v1 === "string" &&
typeof v2 === "string"
) {
- Read upRead up
- Create a ticketCreate a ticket
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
Avoid deeply nested control flow statements. Open
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
- Create a ticketCreate a ticket
Function prepareParams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public prepareParams(_params): boolean|string {
if (
typeof _params === "object"
) {
/**
- Read upRead up
- Create a ticketCreate a ticket
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
debug
Regular Expression Denial of Service Open
"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Regular Expression Denial of Service
Overview:
The debug module is vulnerable to regular expression denial of service when untrusted user input is passed into the o
formatter. It takes around 50k characters to block for 2 seconds making this a low severity issue.
Recommendation:
Upgrade to version 2.6.9 or greater if you are on the 2.6.x series or 3.1.0 or greater.
debug
Regular Expression Denial of Service Open
"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Regular Expression Denial of Service
Overview:
The debug module is vulnerable to regular expression denial of service when untrusted user input is passed into the o
formatter. It takes around 50k characters to block for 2 seconds making this a low severity issue.
Recommendation:
Upgrade to version 2.6.9 or greater if you are on the 2.6.x series or 3.1.0 or greater.
Function parallelUnsubscribe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public parallelUnsubscribe(ID: string): boolean {
try {
if (typeof ID === "string") {
/**
* If required method exist in the stack
- Read upRead up
- Create a ticketCreate a ticket
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 serialUnsubscribe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public serialUnsubscribe(ID: string): boolean {
try {
if (typeof ID === "string") {
/**
* If required method exist in the stack
- Read upRead up
- Create a ticketCreate a ticket
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"