
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
form-data-entries
Advanced tools
This ponyfill implements the FormData
serialization algorithm. It aims to be compatible with calling the native new FormData(form).entries()
. jQuery's serializeArray
is another implementation example.
import formDataEntries from 'form-data-entries'
for (const [name, value] of formDataEntries(myForm)) {
console.log(`${name}=${value}`)
}
This package implements FormData.entries
as a module ponyfill rather than a polyfill. FormData.entries
was a later addition to the FormData
specification. Therefore browsers may support FormData
but not the entries
method. It would be dangerous to attempt to fill just this additional entries
method in browsers that have partial support. This module only implements entries
as a standalone function which will even work in browsers with no FormData
support.
However, once FormData.entries
is widely supported this package should be considered obsolete.
This module makes a best effort to match the behavior of native FormData.entries
. It should be possible in the future to replace calls to formDataEntries(form)
with new FormData(form).entries()
. However, there are some cases where this module can not fully match the native behavior. If the form contains any <input type=file>
elements, the behavior is considered undefined and should not be relied upon.
FAQs
FormData.entries ponyfill
The npm package form-data-entries receives a total of 734 weekly downloads. As such, form-data-entries popularity was classified as not popular.
We found that form-data-entries demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.