Skip to content

Casts anything but buffers and streams to strings on appends. - #362

Open
DylanPiercey wants to merge 1 commit into
form-data:masterfrom
DylanPiercey:dom-parity-cast-string
Open

DylanPiercey wants to merge 1 commit into
form-data:masterfrom
DylanPiercey:dom-parity-cast-string

Conversation

@DylanPiercey

@DylanPiercey DylanPiercey commented Jul 15, 2017 •

Copy link
Copy Markdown
Member

This is another browser parity patch and is a breaking 3.x change.
It allows the module to work the same as the browser when it receives unknown types (anything but buffers and streams) and automatically casts them as a string.

Currently there is the open issue #137 and several similar issues that were closed as duplicates (for things like null, undefined, and objects).


This probably needs more discussion and tests.

@coveralls

coveralls commented Jul 15, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-2.6%) to 95.431% when pulling bbd1d56 on DylanPiercey:dom-parity-cast-string into 9bfb102 on form-data:master.

@jimmywarting

jimmywarting commented Nov 9, 2017 •

Copy link
Copy Markdown

I think this is more like how the browser dose it also. And it's what I implemented in my FormData polyfill for the browser

@danielgindi

Copy link
Copy Markdown

I would love this getting merged!

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

Successfully merging this pull request may close these issues.

4 participants