dist/quenda.js
function(step) {
            if (!step) {
                throw new Error('Not enough arguments');
            }


            if (Array.isArray(step)) {
                step.forEach(function(s) {
                    this.add(s);
                }, this);
            } else {
                if (step.nextDelay && step.nextDelay < 0) {
                    throw new Error('nextDelay property must be greater than 0');
                }

                if (step.fn && typeof(step.fn) !== 'function') {
                    throw new Error('The property fn must be a function');
                }

                if (step.autoDestroy && typeof(step.autoDestroy) !== 'boolean') {
                    throw new Error('The property autoDestroy must be a boolean');
                }

                if (step.preload && !Array.isArray(step.preload)) {
                    throw new Error('The property preload must be an array of urls');
                }

                this.steps.push(step);
            }
            return this;
        }
function(step) {
            if (!step) {
                throw new Error('Not enough arguments');
            }


            if (Array.isArray(step)) {
                step.forEach(function(s) {
                    this.add(s);
                }, this);
            } else {
                if (step.nextDelay && step.nextDelay < 0) {
                    throw new Error('nextDelay property must be greater than 0');
                }

                if (step.fn && typeof(step.fn) !== 'function') {
                    throw new Error('The property fn must be a function');
                }

                if (step.autoDestroy && typeof(step.autoDestroy) !== 'boolean') {
                    throw new Error('The property autoDestroy must be a boolean');
                }

                if (step.preload && !Array.isArray(step.preload)) {
                    throw new Error('The property preload must be an array of urls');
                }

                this.steps.push(step);
            }
            return this;
        }
function ( step ) { if ( ! step ) { throw new Error ( 'Not enough arguments' ) ; } if ( Array . isArray ( step ) ) { step . forEach ( function ( s ) { this . add ( s ) ; } , this ) ; } else { if ( step . nextDelay && step . nextDelay < 0 ) { throw new Error ( 'nextDelay property must be greater than 0' ) ; } if ( step . fn && typeof ( step . fn ) !== 'function' ) { throw new Error ( 'The property fn must be a function' ) ; } if ( step . autoDestroy && typeof ( step . autoDestroy ) !== 'boolean' ) { throw new Error ( 'The property autoDestroy must be a boolean' ) ; } if ( step . preload && ! Array . isArray ( step . preload ) ) { throw new Error ( 'The property preload must be an array of urls' ) ; } this . steps . push ( step ) ; } return this ; }
Adds a new step to this queue
@param {Object} Step definition
@return {Object} This queue instance
Adds a new step to this queue