Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
How is this different from other polyfills? #2
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?
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
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.