diff options
Diffstat (limited to 'client/src/root-helpers/utils.ts')
-rw-r--r-- | client/src/root-helpers/utils.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/root-helpers/utils.ts b/client/src/root-helpers/utils.ts new file mode 100644 index 000000000..acfb565a3 --- /dev/null +++ b/client/src/root-helpers/utils.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | function objectToUrlEncoded (obj: any) { | ||
2 | const str: string[] = [] | ||
3 | for (const key of Object.keys(obj)) { | ||
4 | str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])) | ||
5 | } | ||
6 | |||
7 | return str.join('&') | ||
8 | } | ||
9 | |||
10 | export { | ||
11 | objectToUrlEncoded | ||
12 | } | ||