HTML5 FormData Polyfill for Browsers and Node.js
JSON →The `formdata-polyfill` package provides a robust, spec-compliant `FormData` implementation for both browser environments and Node.js. For browsers, it acts as a polyfill, conditionally replacing the native `FormData` implementation to ensure consistent behavior across older browsers, including patches for `XMLHttpRequest.prototype.send`, `fetch`, and `navigator.sendBeacon`. For Node.js, it offers a pure, modular, and spec-compatible `FormData` class, verified by Web Platform Tests (WPT), which integrates seamlessly with `node-fetch` and modern `fetch` implementations. The current stable version is 4.0.10, released in late 2021. While new feature development appears to have slowed since then, it remains a maintained solution for consistent `FormData` handling, particularly for environments where native support is lacking or inconsistent. A key differentiator is its `formDataToBlob` utility, adopted by projects like Deno and Undici, enabling efficient serialization of `FormData` into `Blob` objects for HTTP requests.
Traffic · last 30 days ↑100% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany