Previously stringify was encoding empty arrays inconsistently with node's querytring module.
For example stringify({ foo:'', bar:[], baz: '' }) => 'foo=&&baz=' - note the extra &.
By adding a filter call to the fragments of the querystring before join-ing then these empty strings are removed, and the query string is encoded correctly.
Previously
stringify
was encoding empty arrays inconsistently with node'squerytring
module.For example
stringify({ foo:'', bar:[], baz: '' }) => 'foo=&&baz='
- note the extra&
.By adding a
filter
call to the fragments of the querystring beforejoin
-ing then these empty strings are removed, and the query string is encoded correctly.Fixes #15