i think detecting "does text look like a domain" was the intent of the linked function. but i think it's false positively identifying anything, even "foo", as a domain, because new URL("http://foo").hostname gives you "foo" this seems like nonsense to me

0

If you have a fediverse account, you can quote this note from your own instance. Search https://bsky.brid.gy/convert/ap/at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/app.bsky.feed.post/3mecaacw4zc2x on your instance and quote it. (Note that quoting is not supported in Mastodon.)