lib/probability/map.js
Function Probability
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Probability = function (map, match) {
var that = this;
// the event map should be an array,
// let's convert it to an object
Function stream
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 = {};
Avoid deeply nested control flow statements. Open
Open
if (that.equal(i, map[j])) {
that.map[map[j]] += fmap[i];
k = true;
break;
}