query-string icon indicating copy to clipboard operation
query-string copied to clipboard

Parse and stringify URL query strings

Results 38 query-string issues
Sort by recently updated
recently updated
newest added

Say we have an Object we are stringifying to become a query param of the following shape (notice the comma in the value) 1. Create an object with its value...

bug

`stringify(parse('?%20&'))` yields only `&`. Bit of an edge-case I admit, but do we want to be losing this information? `parse('?%20&')` yields `{"":null," ":null}`.

enhancement
help wanted

Is there a way to make sure that all parsed values will be inside arrays, even if they're single values? I mean Search string: `?foo1=bar1&foo2=bar1,bar2` `queryString.parse(props.location.search,{arrayFormat: 'comma'});` I'm getting: ```js...

enhancement
help wanted

(related to https://github.com/sindresorhus/query-string/issues/201) ## Consider 2 examples: ```ts const search1 = '?phoneNumber=%2B380951234567&subtopicId=2&topicId=1'; const result1 = queryString.parse(search, { parseBooleans: true, parseNumbers: true, }); const search2 = '?phoneNumber=a%2B380951234567&subtopicId=2&topicId=1'; const result2 = queryString.parse(search,...

enhancement
help wanted

The decoding that takes place in parse() happens too late, leading to encoded '?', '&' and '=' signs not being interpreted correctly: VERSION: 6.13.1 ACTUAL RESULT: parse(?key1=value1&key2=value2) returns: {"key1":"value1","key2":"value2"} parse(%3Fkey1%3Dvalue1%26key2%3Dvalue2)...

It would be very useful to have the following options added to the parse() function: * skipEmptyString * skipNull Currently, I'm having to parse() to maintain the original array structure,...

It would be nice to enable a generic fn that can be used to hack add customize use cases ```js function filterFunc(key, value) { if (key == 'b') { //...

For my use case it would be great if there would be a way to encode an empty array as well. For example, in `bracket` style, maybe `{a: []}` could...

The default `arrayFormat` value of `none` is problematic because arrays of length 1 are serialised to the same format as if the value was the string contained within the array....

```js queryString.stringifyUrl({ url: 'https://foo.bar', query: { top: 'foo' }, fragmentIdentifier: '/bar/hello' }); // => 'https://foo.bar?top=foo#%2Fbar%2Fhello' ``` if set `{ encode: false }`, the other query also won't be encoded

bug
help wanted