Showing 2 of 4 total issues
Function generic
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function generic(defaultFunction) {
// define the dispatch function
var method = function() {
var me = this, possible = [];
var args = Array.prototype.slice.call(arguments);
Consider simplifying this complex logical expression. Open
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);
}