Showing 18 of 26 total issues
Function exports
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (options, callback) {
// defaults
options = options || {};
options.type = options.type || 'linear';
options.indep = options.indep || 'x';
Function exports
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (function () {
"use strict";
// Continous integration using
// Riemann's sum.
- 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 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (type) {
var reqs = sRequired[type],
sums = {},
n = 0,
collect = function (sol) {
Function exports
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
"use strict";
var i, x, data = this,
Data = this.construct();
- 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 Probability
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Probability = function (map, match) {
var that = this;
// the event map should be an array,
// let's convert it to an object
Function exports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (data) {
"use strict";
var e, i, o = {},
toData = require('../../data.js'),
- 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 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
"use strict";
var i, x, data = this,
Data = this.construct();
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (n) {
"use strict";
// .constant()
// Converts a given number into an object that
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (data) {
"use strict";
var e, i, o = {},
toData = require('../../data.js'),
Function stream
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.stream = mapstream(function (occured, next) {
// occured can be a map of frequencies, or
// an array of events
var i, j, k = false,
fmap = {};
Function exports
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (function () {
"use strict";
// Continous integration using
// Riemann's sum.
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (data) {
"use strict";
var e, o = {},
toData = require('../../data.js'),
Avoid deeply nested control flow statements. Open
if (that.equal(i, map[j])) {
that.map[map[j]] += fmap[i];
k = true;
break;
}
Function exports
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (n) {
"use strict";
// .constant()
// Converts a given number into an object that
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (reqs, from) {
"use strict";
var path = require('path'),
sep = path.join('./a', 'b').substr(1, 1),
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
"use strict";
var i, sum, data = 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 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
"use strict";
var i, av, data = 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 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (exp) {
"use strict";
var i, e, Data, data = 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"