OP-Engineering / link-preview-js

⛓ Extract web links information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.
MIT License
770 stars 124 forks source link

replace url module with new URL #137

Closed rogueturnip closed 1 year ago

rogueturnip commented 1 year ago

Just wanted to suggest that you can remove the old url module with the following src = new URL(src, rootUrl).toString();

ospfranco commented 1 year ago

Since this library also works with react native/cordova runtimes and also depending on the Node version, the URL global might not be present... not sure if it is a good idea to drop it.

ospfranco commented 1 year ago

Yeah, as stated the URL api might not be available on all runtimes. There is no need to change the implementation if it is working properly for now. Closing this.