code: function buildResponse(data) {
      var response = {};
      response.totalItems = data.length;
      response.itemsPerPage = itemsPerPage;
      response.totalPages = itemsPerPage === null ? 1 : Math.ceil(data.length / itemsPerPage);
      response.currentPage = itemsPerPage === null ? 1 : currentPage;
      response.data = itemsPerPage === null ? data : data.slice(itemsPerPage * (currentPage - 1), itemsPerPage);
  
      return response;
  }
docs: /*
  Build the response, wraps the data in some extra information like currentpage etc.
  
  @param Array data
  @return Object response