Releases: alloc/json-qs
Releases · alloc/json-qs
v1.2.0
v1.1.0
v1.0.2
- Remove
undefined
from possibledecode
return values. - Ensure array type returned by
decode
is mutable. This was only a type-level issue. Decoded arrays have always been mutable at runtime.
v1.0.1
- Prevent prototype pollution when decoding (i.e. throw on
__proto__
key) - Call
toJSON
method (if present) when encoding - Remove need to escape leading hyphen in string if not followed by a digit:
encode({ sort: '-date' }) // v1.0.0 → "sort=\-date" // v1.0.1 → "sort=-date"
- Throw on unterminated object when decoding:
decode('a={b:{') // v1.0.0 → { a: { b: {} } } // v1.0.1 → throws "Unterminated input" error