thegreenwebfoundation / co2.js

An npm module for accessing the green web API, and estimating the carbon emissions from using digital services
https://developers.thegreenwebfoundation.org/
Other
414 stars 54 forks source link

Refactor: Swap url.parse() for WHATWG URL - resolves #29 #78

Closed mrchrisadams closed 2 years ago

mrchrisadams commented 2 years ago

This PR swaps out use of the url.parse() in co2.js to in favour of the more modern cross platform WHATWG URL API instead. More below:

https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost

See issue #29 fr more.

mrchrisadams commented 2 years ago

@drydenwilliams can I get a second pair of eyes on this from you please?