Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: parseNumbers support includes & excludes options #369

Closed
wants to merge 2 commits into from

Conversation

daiwa233
Copy link

@daiwa233 daiwa233 commented Aug 5, 2023

  1. Added logic to return a string when the value exceeds the maximum safe JavaScript integer
  2. Gives the user more flexibility to customize what to parse or not to parse when setting up parseNumbers.

```
*/
readonly parseNumbers?: boolean;
readonly parseNumbers?: boolean | {includes?: string[]; excludes?: string[]};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels too limiting. I would prefer a filter method that receives the key and value and returns true whether it should be parsed as a number. But the ideal solution would be something like #210

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll look at #249 remaining unfinished parts

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you decide to work no #249, I would recommend posting a proposal on what to do in #249 before writing any code to make sure it's the most optimal solution.

@daiwa233 daiwa233 closed this Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants