Closed minht11 closed 3 months ago
I am using qs library and it seems to omit query entirely when its' value is undefined.
qs
import * as qs from 'qs'; import * as pico from 'picoquery'; const data = { publicationState: undefined, }; const query = qs.stringify(data, { encodeValuesOnly: true, }); const newQuery = pico.stringify(data, { nestingSyntax: 'index', }); console.log(query); console.log(newQuery);
Result: QS: ` Picoquery:publicationState=`
` Picoquery:
Reproduction
Makes sense to me. Should be an easy fix if you want to contribute
Fixed in #51
I am using
qs
library and it seems to omit query entirely when its' value is undefined.Result: QS:
` Picoquery:
publicationState=`Reproduction