Showing 29 of 36 total issues
Function exports
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv, opts) {
return function *save() {
if (this.id && utils.empty(this.json(true))) {
// nothing to update
return this;
- 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 exports
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv, options) {
var getter = function() {
if (!utils.is.obj(this[priv.cache][options.name])) {
this[priv.cache][options.name] = Object.defineProperties({}, descriptors(priv, this, 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"
Further reading
Function exports
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv) {
var facility = function(relate) {
return utils.is.yamb(relate) && relate[priv.symbl].id;
};
- 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 exports
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(opts) {
var props = require('./proto/props')(priv, opts);
var yamb = function Yamb(params) {
this[priv.shado] = utils.clone(schema);
- 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 exports
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(priv, opts) {
return function *save() {
if (this.id && utils.empty(this.json(true))) {
// nothing to update
return this;
Function save
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function *save() {
if (this.id && utils.empty(this.json(true))) {
// nothing to update
return this;
}
Function exports
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(priv, options) {
var getter = function() {
if (!utils.is.obj(this[priv.cache][options.name])) {
this[priv.cache][options.name] = Object.defineProperties({}, descriptors(priv, this, options));
}
Function exports
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv) {
var getter = function() {
if (!utils.is.obj(this[priv.cache].stats)) {
this[priv.cache].stats = Object.defineProperties({}, descriptors(priv, this));
}
- 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 exports
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(opts) {
if (!opts.storage) {
// TODO: fix error message
throw new Error('error with storage');
}
Function exports
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(priv) {
var facility = function(relate) {
return utils.is.yamb(relate) && relate[priv.symbl].id;
};
Function exports
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(opts) {
if (!opts.storage) {
// TODO: fix error message
throw new Error('error with storage');
}
- 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 exports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv, opts) {
return function *similar(all) {
if (!this.id || utils.empty(this.related)) {
return [];
}
- 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 exports
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(opts) {
var props = require('./proto/props')(priv, opts);
var yamb = function Yamb(params) {
this[priv.shado] = utils.clone(schema);
Function exports
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(priv) {
var getter = function() {
if (!utils.is.obj(this[priv.cache].stats)) {
this[priv.cache].stats = Object.defineProperties({}, descriptors(priv, this));
}
Function exports
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(priv) {
var getter = function() {
return utils.clone(this[priv.symbl].tags);
};
Function exports
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv) {
var getter = function() {
return utils.clone(this[priv.symbl].tags);
};
- 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 setter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setter = function(related) {
if (!utils.is.arr(related) && !suppose(related) && !facility(related)) {
return;
}
Function setter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setter = function(value) {
if (options.direct && utils.is.str(value)) {
value = utils.striptags(value.trim());
if (!utils.whitespace(value)) {
Function exports
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv) {
return function json(newer) {
var data = utils.clone(this[priv.symbl]);
if (newer === true) {
- 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 exports
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(priv) {
var getter = function() {
var date = this[priv.symbl].publish;
if (!date) {
return false;
- 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"