Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify difference to native FormData method #13

Closed
HaNdTriX opened this issue Jul 28, 2022 · 1 comment
Closed

Clarify difference to native FormData method #13

HaNdTriX opened this issue Jul 28, 2022 · 1 comment

Comments

@HaNdTriX
Copy link

HaNdTriX commented Jul 28, 2022

Nowadays we have FormData and Object.fromEntries to do the same natively.

const form = document.querySelector('#form')
const formData = new FormData(form)
const jsonData = Object.fromEntries(formData)

Does it make sence to explain in the readme, when to use what?

@jefersondaniel
Copy link
Owner

The fromEntries approach does not give the same results depending on the input types. The documentation shows some examples of how the input types are handled.

@jefersondaniel jefersondaniel closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants