EuIrcBot
EuIrcBot copied to clipboard
onUrl: Provide already-parsed URL objects to modules
trafficstars
From #156:
Something I've been thinking about idly — I wonder if it'd be nice to provide the already-parsed URL object without breaking the API somehow. (The mastodon module I'm writing is just going to
url.parsewhat it gets again.)
We could pass it as a new last argument to url/dupeurl without breaking anything, I think?
There are few enough consumers of url I'm fine not being backwards compatible. In practice, I'm not sure that the majority actually pass it straight to url.parse again though, especially since things like request libraries take strings as urls, not url objects.