Closed benjaminhoffman closed 6 years ago
@benjaminhoffman Hey fellow hoffman - I came here for the same problem. Since it looks like this repo isn't being maintained, you might want to check out https://github.com/sindresorhus/query-string. Cheers!
@benjaminhoffman This library intentionally matches the API of node's built-in querystring which does behave as your issue describes.
This one is curious for me because it seems so obvious that sure I am missing something. My apologies in advance if I am misunderstanding.
I want to be able to do
decode(document.location.search)
but when I do, I get:That leading
?
is causing issues.I would assume that this module would handle this very common situation already, no? If not, then maybe we can pass in an optional setting
removeLeadingQuestionMark
or something?Great first issue! cc @isaacchien @rickbier @LitoMore :)