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
Make type casting configurable #12
base: master
Are you sure you want to change the base?
Conversation
Wow! Very good job. This was one of the things I had in mind. |
Thanks.. 😉 |
If all is in order, may I encourage you to proceed with the merge? I've been pointing my package.json to my fork for a while, but I'd rather point to a published module.. 😄 |
I'm doing the v2.0.0, I'll include this feature. |
Hi @gagle, any plans to merge this PR? |
+1, this would really be useful (e.g when parsing a properties file that contains version numbers...) |
Any updates on this merge? |
I can see how the automatic casting of property values to JavaScript types might come in useful, but sometimes you really just want the literal value.
For my use case: I am reading a properties file containing mappings between file names and their SHA-1 hashes, truncated to 8 characters. Some of those hashes might look like numbers in exponential notation, say '90e02100', in which case having them cast to a Number is definitely not a good thing.
The same could be argued for numbers in octal or hex notation, I guess.
So, as per subject, I made this configurable, added the relevant tests and updated the Readme.