diff options
author | Doog <157747121+doogongithub@users.noreply.github.com> | 2024-02-21 22:07:27 -0500 |
---|---|---|
committer | Doog <157747121+doogongithub@users.noreply.github.com> | 2024-02-21 22:07:27 -0500 |
commit | 3eafb413a48cde60dea8a7355ee621c6acca952f (patch) | |
tree | 044bb4ef57033a33024a3a3ffe6ff64f9a00dc9c /fe/src/lib/utils.ts | |
parent | fac21fa0a72d4a7f1a01ccd44e3acf9c90fd95bd (diff) |
first commit
Diffstat (limited to 'fe/src/lib/utils.ts')
-rw-r--r-- | fe/src/lib/utils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fe/src/lib/utils.ts b/fe/src/lib/utils.ts new file mode 100644 index 0000000..c5501ae --- /dev/null +++ b/fe/src/lib/utils.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export function processFormInput(form) { | ||
2 | const formData = new FormData(form); | ||
3 | const data = {}; | ||
4 | for (let field of formData) { | ||
5 | const [key, value] = field; | ||
6 | data[key] = value; | ||
7 | } | ||
8 | return data; | ||
9 | } | ||