CrazySquirrel/AnimationFrame

View on GitHub

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
*/
Severity: Minor
Found in lib/AnimationFrame.ts - About 7 hrs to fix

File AnimationFrame.ts has 390 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";
/**
* Import interfaces
*/
import IWindow from "../interfaces/IWindow";
Severity: Minor
Found in lib/AnimationFrame.ts - About 5 hrs to fix

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
*/
Severity: Minor
Found in lib/AnimationFrame.ts - About 2 hrs to fix

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
*/
Severity: Major
Found in lib/AnimationFrame.ts - About 2 hrs to fix

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
*/
Severity: Minor
Found in lib/AnimationFrame.ts - About 2 hrs to fix

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
*/
Severity: Minor
Found in lib/AnimationFrame.ts - About 1 hr to fix

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
*/
Severity: Minor
Found in lib/AnimationFrame.ts - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Severity: Critical
Found in lib/AnimationFrame.ts - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Severity: Critical
Found in lib/AnimationFrame.ts - About 1 hr to fix

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"
) {
Severity: Minor
Found in lib/AnimationFrame.ts - About 45 mins to fix

Function prepareParams has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

public prepareParams(_params): boolean|string {
if (
typeof _params === "object"
) {
/**
Severity: Minor
Found in lib/AnimationFrame.ts - About 45 mins to fix

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,
Severity: Major
Found in lib/AnimationFrame.ts - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Severity: Major
Found in lib/AnimationFrame.ts - About 45 mins to fix

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,
Severity: Major
Found in lib/AnimationFrame.ts - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Severity: Major
Found in lib/AnimationFrame.ts - About 45 mins to fix

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,
Severity: Major
Found in lib/AnimationFrame.ts - About 45 mins to fix

debug Regular Expression Denial of Service
Open

"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
Severity: Minor
Found in npm-shrinkwrap.json by nodesecurity

debug Regular Expression Denial of Service
Open

"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
Severity: Minor
Found in npm-shrinkwrap.json by nodesecurity

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
Severity: Minor
Found in lib/AnimationFrame.ts - About 25 mins to fix

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
Severity: Minor
Found in lib/AnimationFrame.ts - About 25 mins to fix
Severity
Category
Status
Source
Language