anywhichway/js-generics

View on GitHub

Showing 2 of 4 total issues

Function generic has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function generic(defaultFunction) {
        // define the dispatch function
        var method = function() {
            var me = this, possible = [];
            var args = Array.prototype.slice.call(arguments);
Severity: Minor
Found in index.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if((count===generic.VARGS || args.length===count) && args.every(function(arg,i) {
                        return arg===undefined || i>count || (i>0 && count===generic.VARGS) || (handler[i] instanceof Function ? (count===generic.VARGS ? handler[i].call(me,args) : handler[i].call(me,arg)) : handler[i]===generic.VTYPE || handler[i]===typeof(arg));
                    })) {
                        possible.push(f);
                    }
    Severity: Critical
    Found in index.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language