Closed alanhett closed 1 year ago
I'm glad you find this repository helpful. I'll try to address your issue ASAP. You can watch the repo for new changes or star it.
You're using the old version of library. Please refer the documentation for v4.
Thanks, I did have the correct version, but I was confused by the options. These options preserve leading zeroes, but it does not disable number parsing entirely (e.g., numbers without leading zeroes will still be parsed as numbers). I'm still willing to write the above if others are interested in such an option.
numberParseOptions: { leadingZeros: false }
Please check strnum library that we use in FXP for value parsing.
This works for me
numberParseOptions: {
leadingZeros: false,
hex: false,
skipLike: /\d/,
}
I think skipLike: /(?:)/
is a better option.
I need an option that will disable number parsing and parse all values as strings. For example, zip codes and tax ID numbers often have leading zeroes that need to be preserved as string types.
I'm thinking of a simple solution, and I'm willing to submit the PR myself, but would like to share my idea here for feedback first. The option property would be something like:
numberParseDisable: true
(which is similar naming to thenumberParseOptions
property). If set to true, it would bypass the strnum process.Thoughts? Any guidance on what source files I should review and/or update to build this would be helpful!