Showing 5 of 5 total issues
Function hasCyclicReferences
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function hasCyclicReferences(obj) {
var seenObjects = [];
function detect(obj) {
if (obj && typeof obj === 'object') {
- 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 buildCRUDExtensionsForList
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
static buildCRUDExtensionsForList({createSuccess, updateSuccess, deleteSuccess}, resourceKey, idKey) {
resourceKey = resourceKey || 'data';
idKey = idKey || 'id';
const opt = arguments[0];
Function actionsTypes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
get actionsTypes() {
const _this = this;
// Private property for lazy getter
if (!this._actionsTypes) {
- 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 _parseLoadOptions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseLoadOptions(options) {
let queryString = '';
let params = {};
const paramsType = typeof options;
Function _parseLoadOptions
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_parseLoadOptions(options) {
let queryString = '';
let params = {};
const paramsType = typeof options;
- 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"