function extractQueryParams(array) {
      var len = (array && array.length), head, queryParams;

      if(len && len > 0 && array[len - 1] && array[len - 1].hasOwnProperty('queryParams')) {
        queryParams = array[len - 1].queryParams;
        head = slice.call(array, 0, len - 1);
        return [head, queryParams];
      } else {
        return [array, null];
      }
    }
function extractQueryParams(array) {
      var len = (array && array.length), head, queryParams;

      if(len && len > 0 && array[len - 1] && array[len - 1].hasOwnProperty('queryParams')) {
        queryParams = array[len - 1].queryParams;
        head = slice.call(array, 0, len - 1);
        return [head, queryParams];
      } else {
        return [array, null];
      }
    }
function extractQueryParams ( array ) { var len = ( array && array . length ) , head , queryParams ; if ( len && len > 0 && array [ len - 1 ] && array [ len - 1 ] . hasOwnProperty ( 'queryParams' ) ) { queryParams = array [ len - 1 ] . queryParams ; head = slice . call ( array , 0 , len - 1 ) ; return [ head , queryParams ] ; } else { return [ array , null ] ; } }
@private

Extracts query params from the end of an array
@private