src/services/queue-handler.js
function(handler, priority) {
        if(handler && handler.constructor === Array) {
          handler.forEach(function(layer) {
            layer.priority = typeof layer.priority === 'undefined' ? 1 : layer.priority;
          });
          _list = _list.concat(handler);
        } else {
          handler.priority = priority || (typeof handler.priority === 'undefined' ? 1 : handler.priority);
          _list.push(handler);
        }
        return this;
      }
function(handler, priority) {
        if(handler && handler.constructor === Array) {
          handler.forEach(function(layer) {
            layer.priority = typeof layer.priority === 'undefined' ? 1 : layer.priority;
          });
          _list = _list.concat(handler);
        } else {
          handler.priority = priority || (typeof handler.priority === 'undefined' ? 1 : handler.priority);
          _list.push(handler);
        }
        return this;
      }
function ( handler , priority ) { if ( handler && handler . constructor === Array ) { handler . forEach ( function ( layer ) { layer . priority = typeof layer . priority === 'undefined' ? 1 : layer . priority ; } ) ; _list = _list . concat ( handler ) ; } else { handler . priority = priority || ( typeof handler . priority === 'undefined' ? 1 : handler . priority ) ; _list . push ( handler ) ; } return this ; }
Add a handler

@param {Mixed}  handler A Function or an Array of Functions to add to the queue
@return {Queue}         Itself; chainable
Add a handler