Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is this different from other polyfills? #2

Closed
IanVS opened this issue Mar 1, 2017 · 4 comments
Closed

How is this different from other polyfills? #2

IanVS opened this issue Mar 1, 2017 · 4 comments

Comments

@IanVS
Copy link

IanVS commented Mar 1, 2017

Specifically, what are the differences between this library and https://github.com/WebReflection/url-search-params, which seems to be recommended by google here: https://developers.google.com/web/updates/2016/01/urlsearchparams. Can you explain a little bit about how this polyfill is different?

@IanVS
Copy link
Author

IanVS commented Mar 1, 2017

To answer my own question, it looks like the main difference is that this is a polyfill, vs. url-search-params is a ponyfill. Is that accurate?

@jerrybendy
Copy link
Owner

Yes, you are right. First I wrote this library because there is no suitable to choose. The main difference I think is that, url-search-params is more like a library that for nodejs only. Although they support AMD and UMD libraries, but you cannot use it for webpack or other package scenes.

This library is more emphasis on the browser side, of cause, can also be used for Nodejs . It will register a global var for window or global.

You can use this for all the browser scenes or with other libraries, such as whatwg-fetch. Whatwg-fetch will depend on URLSeatchParams class in some scenes, but you cannot use the other library instead.

Of course I also consider merging this library into another. 😃

@IanVS
Copy link
Author

IanVS commented Mar 2, 2017

Cool, thanks for the explanation!

@IanVS IanVS closed this as completed Mar 2, 2017
@jerrybendy
Copy link
Owner

I thought that my bad English would make you doubt, fortunately, did not 😂

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

No branches or pull requests

2 participants