Showing 130 of 197 total issues
Function make_intern
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function make_intern() {
return {
// TODO: explicit tests for these operators
op: {
seneca_plugin: (tr, ctx, data) => {
- 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 make_plugin_key
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function make_plugin_key(plugin, origtag) {
if (null == plugin) {
throw error('missing_plugin_name');
}
let name = null == plugin.name ? plugin : plugin.name;
- 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 make_use
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function make_use(ordu, callpoint) {
let seq = { index: 0 };
return function use() {
let self = this;
let args = [...arguments];
- 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 client
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function client(this: any, callpoint: any) {
return function api_client(this: any) {
const private$ = this.private$
const argsarr = Array.prototype.slice.call(arguments)
const self = 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 client
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function client(callpoint) {
return function api_client() {
const private$ = this.private$;
const argsarr = Array.prototype.slice.call(arguments);
const self = 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 make_plugin_key
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function make_plugin_key(plugin: any, origtag: any) {
if (null == plugin) {
throw error('missing_plugin_name')
}
- 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 translate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function translate(
this: any,
from_in: any,
to_in: any,
pick_in?: any,
- 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 translate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function translate(from_in, to_in, pick_in, flags) {
const from = 'string' === typeof from_in ? this.util.Jsonic(from_in) : from_in;
const to = 'string' === typeof to_in ? this.util.Jsonic(to_in) : to_in;
let pick = {};
if ('string' === typeof pick_in) {
- 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 do_act
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
do_act: function(instance: any, opts: any, origmsg: any, origreply: any) {
let timedout = false
const actmsg = intern.make_actmsg(origmsg)
const meta = new Meta(instance, opts, origmsg, origreply)
- 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 do_act
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
do_act: function (instance, opts, origmsg, origreply) {
let timedout = false;
const actmsg = intern.make_actmsg(origmsg);
const meta = new meta_1.Meta(instance, opts, origmsg, origreply);
// Gated actions must complete before further actions can start.
- 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 api_prior
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function api_prior(this: any) {
if (null == this.private$.act) {
// TODO: should be a top level api method: seneca.fail
throw this.util.error('no_prior_action', { args: arguments })
}
- 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 build_log
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function build_log(self: any) {
var logspec = build_log_spec(self)
// shortcut for direct access (avoids seneca.options() call)
self.private$.logspec = logspec
- 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 copydata
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function copydata(obj) {
var copy;
// Handle the 3 simple types, and null or undefined
if (obj === null || typeof obj !== 'object')
return obj;
- 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 explain
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
intern.explain = function(meta: any, entry: any) {
var orig_explain = this.explain
var explain = meta.explain
if (true === entry || false === entry) {
- 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 constructor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
constructor(instance: any, opts: any, origmsg: any, origreply: any) {
let id_tx = Meta.resolve_msg_id_tx(instance, origmsg)
let origmeta = origmsg.meta$
- 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 api_prior
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function api_prior() {
if (null == this.private$.act) {
// TODO: should be a top level api method: seneca.fail
throw this.util.error('no_prior_action', { args: arguments });
}
- 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 inward_validate_msg
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function inward_validate_msg(spec: any) {
const ctx = spec.ctx
const data = spec.data
var so = ctx.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 explain
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
intern.explain = function (meta, entry) {
var orig_explain = this.explain;
var explain = meta.explain;
if (true === entry || false === entry) {
return orig_explain.call(this, entry);
- 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 constructor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
constructor(instance, opts, origmsg, origreply) {
this.start = Date.now();
this.mi = '';
this.tx = '';
this.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 copydata
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function copydata(obj: any) {
var copy: any
// Handle the 3 simple types, and null or undefined
if (obj === null || typeof obj !== 'object') return obj
- 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"