Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

fetch() #53

Closed
puppetmaster3 opened this issue Mar 11, 2017 · 7 comments
Closed

fetch() #53

puppetmaster3 opened this issue Mar 11, 2017 · 7 comments

Comments

@puppetmaster3
Copy link

fetch() runs in a browser.
And sometimes I port my code to node.
But in node, I need to 'polyfill' fetch()

That is an example where I think there should be more parity.

@Fishrock123
Copy link

Could you try looking for an npm module?

There isn't anything special about fetch() that it can't be written in a user module.

@puppetmaster3
Copy link
Author

I do use 3rd party. My point is I should not have to.
Another ex: abt() for base64. There should be more parity.

@fnky
Copy link

fnky commented Mar 13, 2017

Do you mean atob()? atob, btoa and fetch aren't part of ECMAScript; but part of the WhatWG spec. I agree it would be nice to have it in, just like the WhatWG URL Implementation. Whether it's necessary in node core, I am not so sure.

Read why they turned down atob and btoa in node core.

@Fishrock123
Copy link

@JHabdas how so?

@ghost
Copy link

ghost commented Mar 28, 2017

Sorry that was a misfire. Was thinking of import(). My bad.

@piranna
Copy link

piranna commented May 24, 2017

I think there should be alternatives for the web environment following the W3C APIs to allow easy interoperatibility and reuse of code, but I don't think they should be added to the Node.js core, in fact I think this should be lighten and move things to npm (but that's another discussion). A module that export all the WhatWG APIs so you can use them directly from Node.js would be a really good thing.

@bmeck
Copy link
Member

bmeck commented Oct 13, 2017

I'm going to close this as the repo is being archived and there is a lack of activity.

My suggestion is to make a PR and/or issue on https://github.com/nodejs/node to discuss this. The TSC has moved towards being more open to PRs as an effort to be more welcoming. Hope it all works out!

@bmeck bmeck closed this as completed Oct 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants