Showing 301 of 580 total issues
Avoid too many return
statements within this function. Open
if ('object' == typeof key) return each(key, set);
Avoid too many return
statements within this function. Open
return ms + 'ms';
Avoid too many return
statements within this function. Open
if (!hashbang && el.pathname === location.pathname && (el.hash || '#' === link)) return;
Avoid too many return
statements within this function. Open
try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}
Avoid too many return
statements within this function. Open
return {
x: this.labelAnchor.x - bboxSide,
y: this.labelAnchor.y,
width: bboxSide,
height: bboxSide
Avoid too many return
statements within this function. Open
return {
x: this.labelAnchor.x - bboxSide,
y: this.labelAnchor.y - bboxSide,
width: bboxSide,
height: bboxSide
Avoid too many return
statements within this function. Open
if (!sameOrigin(el.href)) return;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
if (base && orig === path) return;
Avoid too many return
statements within this function. Open
return {
x: this.labelAnchor.x,
y: this.labelAnchor.y,
width: bboxSide,
height: bboxSide
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return {
x: this.labelAnchor.x,
y: this.labelAnchor.y - bboxSide,
width: bboxSide,
height: bboxSide
Avoid too many return
statements within this function. Open
if (link && link.indexOf('mailto:') > -1) return;
Avoid too many return
statements within this function. Open
return '#333'
Avoid too many return
statements within this function. Open
if (el.getAttribute('download') || el.getAttribute('rel') === 'external') return;
Avoid too many return
statements within this function. Open
if (el.target) return;
Avoid too many return
statements within this function. Open
return true
Function store
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function store(key, value){
var length = arguments.length;
if (0 == length) return all();
if (2 <= length) return set(key, value);
if (1 != length) 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 mergeEdges
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
NetworkGraph.prototype.mergeEdges = function(edge1, edge2) {
// reverse edges if necessary
if (edge1.fromVertex === edge2.toVertex) {
this.mergeEdges(edge2, edge1);
- 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 loadCommuter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function loadCommuter (next) {
var commuterData = store('commuter')
var user = session.user()
if (session.commuter()) {
- 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"