You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose that ppl start using URLSearchParams instead of query-string.
Why?
URLSearchParams is available in Deno, browsers and also Node. so you would be less dependent on something that is a node only feature.
URLSearchParams follows a spec. i suppose more ppl knows how URLSearchParams works. and don't have to learn how a node specific lib works
querystring will mix the value between string and arrays giving you an inconsistent api.
this is a footgun where you can shoot yourself if you try to parse query strings and you would expect everything to be an object and clients adds more params to the url
i suspect node would never have gone to implementing query-string if URLSearchParams was first implemented. There is a new trend that ppl and Node wants to follow the spec more and more, ppl wants to be able to write cross platform applications and that involves using technology that is available in all environments. some developers don't want to use module x cuz it's too dependent on Node
The text was updated successfully, but these errors were encountered:
I propose that ppl start using URLSearchParams instead of query-string.
Why?
this is a footgun where you can shoot yourself if you try to parse query strings and you would expect everything to be an object and clients adds more params to the url
i suspect node would never have gone to implementing query-string if URLSearchParams was first implemented. There is a new trend that ppl and Node wants to follow the spec more and more, ppl wants to be able to write cross platform applications and that involves using technology that is available in all environments. some developers don't want to use module x cuz it's too dependent on Node
The text was updated successfully, but these errors were encountered: