We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case:
it('should parse arrays correctly', () => { const search = '?testA%5B%5D=1&testB%5B%5D=a%2Cb%2Cc%2Cd%2Ce%2Cf&testC=true'; const result = queryString.parse(search, { parseBooleans: true, parseNumbers: true, arrayFormat: 'bracket-separator', }); expect(result).toEqual({ testA: [1], testB: ['a', 'b', 'c', 'd', 'e', 'f'], testC: true, }); });
results in:
when it's unencoded it works fine:
it('should parse arrays correctly', () => { const search = '?testA%5B%5D=1&testB%5B%5D=a,b,c,d,e,f&testC=true'; const result = queryString.parse(search, { parseBooleans: true, parseNumbers: true, arrayFormat: 'bracket-separator', }); expect(result).toEqual({ testA: [1], testB: ['a', 'b', 'c', 'd', 'e', 'f'], testC: true, }); });
Library version: 9.1.0
The text was updated successfully, but these errors were encountered:
Good spot, thanks for raising. @sindresorhus I have raised #392 which should fix this regression 💪
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Test case:
results in:
when it's unencoded it works fine:
Library version: 9.1.0
The text was updated successfully, but these errors were encountered: