karimsa/solver.js

View on GitHub
lib/probability/map.js

Summary

Maintainability
A
3 hrs
Test Coverage

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
Severity: Minor
Found in lib/probability/map.js - About 1 hr to fix

    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 = {};
    Severity: Minor
    Found in lib/probability/map.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (that.equal(i, map[j])) {
                                          that.map[map[j]] += fmap[i];
                                          k = true;
                                          break;
                                      }
      Severity: Major
      Found in lib/probability/map.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status