Skip to content

Centralise the checks for blob and form data support - #78

Merged
josh merged 2 commits into
JakeChampion:masterfrom
matthew-andrews:centralise-support-checks
Jan 24, 2015
Merged

josh merged 2 commits into
JakeChampion:masterfrom
matthew-andrews:centralise-support-checks

Conversation

@matthew-andrews

Copy link
Copy Markdown
Contributor

This helps with isomorphic-fetch (currently it's relying on a fork that has these extra few lines:- https://github.com/matthew-andrews/fetch/blob/master/fetch.js#L3-5) and (I think) makes fetch's implementation simpler.

Comment thread fetch.js Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't sure about this because blobSupport actually checks a lot more than just 'Blob' in self

@josh

josh commented Jan 24, 2015

Copy link
Copy Markdown
Contributor

If it would help you more, I wouldn't mind centralizing all the checks to the top with a single object like

var support = {
  "Blob": howeverTestBlob,
  "FileReader": somethingTestFileReader
}

We could even export it as fetch._support if you wanted to runtime hack or inspect it.

@matthew-andrews

Copy link
Copy Markdown
Contributor Author

Umm, I don't mind. I would just like it to do its checks upfront so that I can restore self after requireing fetch.

I can definitely tidy them all up into a single object though.

@josh

josh commented Jan 24, 2015

Copy link
Copy Markdown
Contributor

❀️

josh added a commit that referenced this pull request Jan 24, 2015
Centralise the checks for blob and form data support
@josh
josh merged commit 0c27c94 into JakeChampion:master Jan 24, 2015
@matthew-andrews

Copy link
Copy Markdown
Contributor Author

Would you mind if I made a (minor) release for this & #77?

@josh

josh commented Jan 24, 2015

Copy link
Copy Markdown
Contributor

no problem, done 115cd97

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants