Function set
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
set: (v) => {
if (!root._AnimationFrame) {
* root._AnimationFrame was empty and can be set
*/
File AnimationFrame.ts
has 390 lines of code (exceeds 250 allowed). Consider refactoring.
"use strict";
* Import interfaces
*/
import IWindow from "../interfaces/IWindow";
Function parallelWatch
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
public parallelWatch(): void {
try {
* If stack exist, it is an object and it is contains methods
*/
Function set
has 68 lines of code (exceeds 25 allowed). Consider refactoring.
set: (v) => {
if (!root._AnimationFrame) {
* root._AnimationFrame was empty and can be set
*/
Function serialWatch
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
public serialWatch(): void {
try {
* If stack exist, it is an object and it is contains methods
*/
Function serialWatch
has 40 lines of code (exceeds 25 allowed). Consider refactoring.
public serialWatch(): void {
try {
* If stack exist, it is an object and it is contains methods
*/
Function parallelWatch
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
public parallelWatch(): void {
try {
* If stack exist, it is an object and it is contains methods
*/
Consider simplifying this complex logical expression.
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Consider simplifying this complex logical expression.
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Function version_lt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
function version_lt(v1, v2) {
if (
typeof v1 === "string" &&
typeof v2 === "string"
) {
Function prepareParams
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
public prepareParams(_params): boolean|string {
if (
typeof _params === "object"
) {
Avoid deeply nested control flow statements.
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,
Avoid deeply nested control flow statements.
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Avoid deeply nested control flow statements.
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,
Avoid deeply nested control flow statements.
if (
objCall &&
typeof objCall === "object" &&
objCall.context &&
objCall.callback &&
Avoid deeply nested control flow statements.
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,
debug
Regular Expression Denial of Service
"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
debug
Regular Expression Denial of Service
"debug": {
"version": "2.2.0",
"dependencies": {
"ms": {
"version": "0.7.1"
Function parallelUnsubscribe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public parallelUnsubscribe(ID: string): boolean {
try {
if (typeof ID === "string") {
* If required method exist in the stack
Function serialUnsubscribe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public serialUnsubscribe(ID: string): boolean {
try {
if (typeof ID === "string") {
* If required method exist in the stack