marcog83/RoboJS

View on GitHub

Showing 7 of 7 total issues

Function registerListener has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

registerListener(listener, scope, once) {
const _listeners = this.listenerBoxes.filter(box => box.listener === listener && box.scope === scope);
 
if (!_listeners.length) {
if (this.listenersNeedCloning) {
Severity: Minor
Found in src/events/Signal.js - About 55 mins to fix

Function default has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function (x) {
const isArray = Array.isArray || _isArray;
if (!x) {
return false;
}
Severity: Minor
Found in src/internal/_isArrayLike.js - About 55 mins to fix

Function arityFn has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const arityFn=(function (FUNCTIONS) {
return (arity, fn) => {
if (typeof arity !== 'number') {
throw new TypeError('Expected arity to be a number, got ' + arity);
}
Severity: Minor
Found in src/internal/_arity.js - About 35 mins to fix

Avoid too many return statements within this function.
Open

return !!x.length;
Severity: Major
Found in src/internal/_isArrayLike.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

return true;
Severity: Major
Found in src/internal/_isArrayLike.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
Severity: Major
Found in src/internal/_isArrayLike.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

return false;
Severity: Major
Found in src/internal/_isArrayLike.js - About 30 mins to fix
Severity
Category
Status
Source
Language