| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-10-21 | 4.2 kB | |
| v10.0.0 source code.tar.gz | 2026-10-21 | 62.6 kB | |
| v10.0.0 source code.zip | 2026-10-21 | 72.7 kB | |
| Totals: 3 Items | 139.5 kB | 0 | |
Breaking
- Require Node.js 22 dc9cd5e
stringify()now throws aTypeErrorfor values it cannot represent, like objects, functions, symbols, andDate99d9c07- Before,
{a: {}}becamea=%5Bobject%20Object%5D. Use thereplaceroption to convert such values.
- Before,
parse()now collects a repeated key into an array with everyarrayFormat27018f4 a6d6a7f- Before,
bracket,index,colon-list-separator,bracket-separator,comma, andseparatorkept only the last value, sofoo=1&foo=2gave{foo: '2'}.
- Before,
- An explicit
typesentry now always takes precedence overparseNumbersandparseBooleans, and a value that does not match its type stays a string 04649de f48a249 - The
string[]andnumber[]types now always give an array (except witharrayFormat: 'none', as documented) 04649de 2a6984f - A percent-encoded byte that is not valid UTF-8 now decodes to
U+FFFD, likeURLSearchParams, instead of being kept as-is 19331de arrayFormat: 'bracket-separator'no longer splits on a percent-encoded separator, likecommaandseparator(#398) deb9784foo[]=a%2Cb,cnow gives['a,b', 'c'].
stringifyUrl()now percent-encodes%infragmentIdentifier1602ae0- The fragment identifier is now a decoded value, like the query values, so it round-trips with
parseUrl(). If you passed an already encoded fragment identifier, pass it decoded.
- The fragment identifier is now a decoded value, like the query values, so it round-trips with
pick()andexclude()now write the kept parameters back exactly as they were in the URL 1646c64 e087ca9 a7391f2- Options like
parseNumbers,parseBooleans,types, anddecodeonly change the value the filter receives. Before,pick('https://foo.bar?id=007', ['id'], {parseNumbers: true})gaveid=7.
- Options like
Improvements
- Remove the
decode-uri-componentdependency and decode in linear time 19331de- The old decoder was quadratic for some malformed input.
- Fix
parse()being quadratic for a key that repeats many times witharrayFormat: 'comma'and'separator'00a52ff - TypeScript: The parsed value types now follow the
parseNumbers,parseBooleans, andtypesoptions, also forparseUrl(),pick(), andexclude()d239f4f 472777f 789fc36 - An option that is explicitly
undefinednow uses its default value 1646c64
Fixes
- Fix
stringify()output that did not parse back to the same value 13bc381 b63dc56 deb9784- This affected a separator like
-or.inside a value,nullitems withcolon-list-separator, and arrays that became empty after skipping items withbracket-separator.
- This affected a separator like
- Fix
stringify()throwingURIErrorfor a string with a lone surrogate b9ff3f8 - Fix the
sortoption 220906a 678ddff 6c6506dsort: truethrew instringify(),parse()threw whensortwas not a boolean or a function,sort: falsebrokearrayFormat: 'index', andpick()ignoredsort: false.
- Fix
stringifyUrl()turning anindexformat array that is already in the URL into[object Object](#422) 220906a - Fix
stringifyUrl(),pick(), andexclude()corrupting the query and the fragment identifier withencode: false7268b7a c75c681 - Fix
stringifyUrl()changing the parameters that are already in the URL when you give it parse options 93c3e1e - Fix
parseUrl()andstringifyUrl()keeping leading and trailing whitespace 1d91dbf 93c3e1e - Fix
parse()throwing forarrayFormat: 'index'when a plain value comes before the indexed entries 8e9d58d - Fix
parse()usingtypeskeys inherited fromObject.prototype, liketoString(#421) 0682872 - Fix
stringify()ignoring thereplacerresult forskipNullandskipEmptyString42210ea - Fix
stringify()reading each value twice, which ran getters andProxytraps two times 5e50210 - Fix
stringifyUrl()not accepting aninterfaceforquerycd042b8
https://github.com/sindresorhus/query-string/compare/v9.5.1...v10.0.0