aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/utils.ts
blob: acfb565a3635af92122cddb89e68374358eaeb19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
function objectToUrlEncoded (obj: any) {
  const str: string[] = []
  for (const key of Object.keys(obj)) {
    str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))
  }

  return str.join('&')
}

export {
  objectToUrlEncoded
}