All Projects → github → form-data-entries

github / form-data-entries

Licence: MIT license
FormData.entries ponyfill

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to form-data-entries

Fakeindexeddb
A pure JS in-memory implementation of the IndexedDB API
Stars: ✭ 373 (+997.06%)
Mutual labels:  ponyfill
Css Vars Ponyfill
Client-side support for CSS custom properties (aka "CSS variables") in legacy and modern browsers
Stars: ✭ 1,166 (+3329.41%)
Mutual labels:  ponyfill
multer-sharp-s3
Multer Sharp S3 is streaming multer storage engine permit to transform / resize the image and upload to AWS S3.
Stars: ✭ 54 (+58.82%)
Mutual labels:  formdata
Unfetch
🐕 Bare minimum 500b fetch polyfill.
Stars: ✭ 5,239 (+15308.82%)
Mutual labels:  ponyfill
Os Tmpdir
[DEPRECATED] Node.js os.tmpdir() ponyfill
Stars: ✭ 31 (-8.82%)
Mutual labels:  ponyfill
Fetch Ponyfill
WHATWG fetch ponyfill
Stars: ✭ 209 (+514.71%)
Mutual labels:  ponyfill
Abortcontroller Polyfill
Polyfill for the AbortController DOM API and abortable fetch (stub that calls catch, doesn't actually abort request).
Stars: ✭ 273 (+702.94%)
Mutual labels:  ponyfill
spiced-final-project
Career explorer platform developed in React.js in 6 days.
Stars: ✭ 14 (-58.82%)
Mutual labels:  formdata
Os Homedir
[DEPRECATED] Node.js `os.homedir()` ponyfill
Stars: ✭ 55 (+61.76%)
Mutual labels:  ponyfill
max-safe-integer
ES2015 Number.MAX_SAFE_INTEGER ponyfill
Stars: ✭ 15 (-55.88%)
Mutual labels:  ponyfill
Clipboard Polyfill
📋 Simple copying on the web, with maximum browser compatibility.
Stars: ✭ 748 (+2100%)
Mutual labels:  ponyfill
Ponyfill
🦄 Like polyfill but with pony pureness
Stars: ✭ 945 (+2679.41%)
Mutual labels:  ponyfill
Tickedoff
Tiny library (<200B gzip) for deferring something by a "tick"
Stars: ✭ 213 (+526.47%)
Mutual labels:  ponyfill
Resize Observer
Polyfills the ResizeObserver API.
Stars: ✭ 540 (+1488.24%)
Mutual labels:  ponyfill
pony-cause
Ponyfill and helpers for the standardized Error Causes
Stars: ✭ 42 (+23.53%)
Mutual labels:  ponyfill
Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (+11014.71%)
Mutual labels:  ponyfill
Resize Observer Polyfill
A polyfill for the Resize Observer API
Stars: ✭ 1,530 (+4400%)
Mutual labels:  ponyfill
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (+8.82%)
Mutual labels:  formdata
formdata
Parsing of multipart/form-data
Stars: ✭ 53 (+55.88%)
Mutual labels:  formdata
Core Js
Standard Library
Stars: ✭ 15,854 (+46529.41%)
Mutual labels:  ponyfill

FormData.entries ponyfill

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.

Usage

import formDataEntries from 'form-data-entries'

for (const [name, value] of formDataEntries(myForm)) {
  console.log(`${name}=${value}`)
}

Why ponyfill?

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.

Undefined Behavior

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.
  • In Safari when FormData is constructed on the submit event, it will include the submitter value. This behavior does not exist in other browsers, and is not and can not be implemented in the ponyfill since the submitter element is not exposed.

Test Suite

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].