code: function formatQuery (query) {
    return Object.keys(query).sort().map(key => {
      var val = query[key]
      if (val == null) {
        return ''
      }
      if (Array.isArray(val)) {
        return val.slice().map(val2 => [key, '=', val2].join('')).join('&')
      }
      return key + '=' + val
    }).filter(Boolean).join('&')
  }
docs: Transform data object to query string
  
  @param  {object} query
  @return {string}