Skip to content

Support passing a function or predefined config to parseNumbers #387

@joeyfigaro

Description

@joeyfigaro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions