network
network copied to clipboard
chore(dht): Use `URLSearchParams` to parse search params
Summary
I switch to URLSearchParams for query param parsing and kill a dependency (querystring).
URLSearchParams is
- Widely supported by browsers (97%+).
- Available in node (global scope) since v15, stable since v10.
querystring is
- Deprecated.
- Doesn't seem to work well in browsers (breaks browser tests if not treated properly).
Changes
- Ditch
querystring - Use
URLSearchParamsinstead
Limitations and future improvements
- n/a
Checklist before requesting a review
- [x] Is this a breaking change? If it is, be clear in summary.
- [x] Read through code myself one more time.
- [x] Make sure any and all
TODOcomments left behind are meant to be left in. - [x] Has reasonable passing test coverage?
- [x] Updated changelog if applicable.
- [x] Updated documentation if applicable.