apps/files_external/js/rollingqueue.js
Function RollingQueue
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var RollingQueue = function (functionList, queueWindow, callback) {
this.queueWindow = queueWindow || 1;
this.functionList = functionList;
this.callback = callback;
this.counter = 0;
Function launchNext
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.launchNext = function() {
var currentCounter = this.counter++;
if (currentCounter in this.functionList) {
var funcData = this.functionList[currentCounter];
if ($.isFunction(funcData.funcName)) {
Avoid deeply nested control flow statements. Open
Open
if ($.isFunction(this.callback)) {
$.when.apply($, this.deferredsList)
.always($.proxy(function(){
this.callback();
}, this)