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