query-string icon indicating copy to clipboard operation
query-string copied to clipboard

Support passing a function or predefined config to `parseNumbers`

Open joeyfigaro opened this issue 6 days ago • 0 comments

I'm basically looking to achieve the opposite of #199 – I want ["123", "00A", "441"] to remain ["123", "00A", "441"]. For our current needs the only properties that would have these arrays are known ahead of time, and arrays don't appear anywhere else...so something like { parseNumbers: "except-arrays" } would work.

Alternatively, parseNumbers could take a function that receives the current value's associated key so we can provide a callback that returns true or false given the name of the property.

If this is something you'd be interested in supporting, I'm happy to take a crack at a PR.

Update: it looks like we could update this area if we ended up supporting callback functions for parseNumbers

joeyfigaro avatar Jun 26 '24 19:06 joeyfigaro