code: function present(req, res, next) {
  
      // Sort
      if (req._internal._sort) {
        req._internal._order = req._internal._order || 'ASC'
        req._internal.resource = _.sortBy(req._internal.resource, function (element) {
          return element[req._internal._sort]
        })
        if (req._internal._order === 'DESC') {
          req._internal.resource.reverse()
        }
      }
  
      // Slice result
      if (req._internal._end || req._internal._limit) {
        res.setHeader('X-Total-Count', req._internal.resource.length)
        res.setHeader('Access-Control-Expose-Headers', 'X-Total-Count')
      }
      req._internal._start = parseInt(req._internal._start) || 0
      if (req._internal._end) {
        req._internal.resource = req._internal.resource.slice(req._internal._start, parseInt(req._internal._end))
      } else if (req._internal._limit) {
  
        // Convert strings to int and sum to get end value
        req._internal.resource = req._internal.resource.slice(req._internal._start, parseInt(req._internal._start) + parseInt(req._internal._limit))
      }
      res.jsonp(req._internal.resource)
    }
docs: Presentation layer: Apply sorting / pagination to response