code: function getPaginationMeta(opt) {
  
      opt = opt || {};
  
      opt.limit = typeof opt.limit !== 'number' ?
          100 : opt.limit === 0
              ? Infinity : opt.limit;
  
      opt.offset = typeof opt.offset !== 'number' ? 0 : opt.offset;
      opt.count = typeof opt.count !== 'number' ? 0 : opt.count;
  
      let out = {
          first: {},
          last: {}
      };
  
      if (opt.limit !== Infinity) {
          out.first.limit = opt.limit;
          out.last.limit = opt.limit;
      }
  
      if (opt.offset + opt.limit < opt.count) {
          out.next = {
              offset: opt.offset + opt.limit,
              limit: opt.limit
          };
      }
  
      if (opt.offset) {
          out.prev = {
              offset: (opt.offset - opt.limit < 0) ? 0 : opt.offset - opt.limit,
              limit: opt.limit
          };
      }
  
      if (opt.count % opt.limit && parseInt(opt.count / opt.limit)) {
          out.last.offset = opt.count / opt.limit;
      } else {
          out.last.offset = Math.max(0, opt.count - opt.limit);
      }
  
      return out;
  }
docs: @function getPaginationMeta
  @memberof Utils
  @static
  @example
  require('bi-service').utils.getPaginationMeta(options)
  //Although you probably want to use res.setPaginationHeaders(options) method
  // which sets all response headers needed for pagination
  
  @param {Object} options
  @param {Integer} options.limit
  @param {Integer} options.offset
  @param {Integer} options.count
  @return {Object}