Ashwell/EnumJS

View on GitHub

Showing 3 of 3 total issues

Function Enum has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.Enum = (function () {
  "use strict";
  var Enum = function ( enums ) {
    var i,
        keys = [],
Severity: Major
Found in enum.js - About 3 hrs to fix

    Function Enum has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var Enum = function ( enums ) {
        var i,
            keys = [],
            values = [],
            length = 0;
    Severity: Major
    Found in enum.js - About 2 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                if ( values.lastIndexOf(enums[i]) !== -1 ) {
                  throw new TypeError('Enum Constructor Failure, you must pass a unique value for each key');
                }
      Severity: Major
      Found in enum.js - About 45 mins to fix
        Severity
        Category
        Status
        Source
        Language