An option to skip values matching defaults from createSerializer(parsers)(values)
output
#570
-
Is there an option to skip values matching defaults from So, e.g. const parsers = {
contacts: parseAsArrayOf(parseAsString).withDefault([]),
}
const serializer = createSerializer(parsers)
serializer(url, values) // !!! would return Here's a similar issue but it ends up with accepting I don't see it as an acceptable solution, I would like to avoid I see no technical blocker that would make the goal of avoiding query params matching their defaults non-achievable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It could be a matter of checking the value against the default (if any, and using the Would you like to open a PR? |
Beta Was this translation helpful? Give feedback.
FYI, this is being worked on in #720 and should land in v2.1.0.