Closed
Description
The new types added in #279 are too restrictive as they eliminate the possibility of nulls being in the arrays.
Consider the following acceptable use of parse and stringify:
> const qs = require('query-string')
undefined
> qs.parse('?foo&foo=1&foo&foo=test&foo=&foo')
[Object: null prototype] { foo: [ null, '1', null, 'test', '', null ] }
> qs.stringify({ foo: [null, '1', null, 'test', '', null] })
'foo&foo=1&foo&foo=test&foo=&foo'
While [null, '1', null, 'test', '', null]
is a valid value, it does not meet the definition of Stringifiable[]
which is (string | boolean | number)[]
Metadata
Metadata
Assignees
Labels
No labels