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

Is there a way to not auto translate hex values? #17

Open
JoachimR opened this issue May 6, 2015 · 4 comments
Open

Is there a way to not auto translate hex values? #17

JoachimR opened this issue May 6, 2015 · 4 comments

Comments

@JoachimR
Copy link

JoachimR commented May 6, 2015

my config file:

bla=bla
HEX_ARRAY_1=0x34,0x38,0x99
HEX_ARRAY_2=0x31

properties parse result:

{ bla: 'bla', 
  HEX_ARRAY_1: '0x34,0x38,0x99',
  HEX_ARRAY_2: 49 }

The one value in HEX_ARRAY_2 is translated to decimal directly.

Is there a way to not do that ?

@shaochuancs
Copy link

By default, property values will be cast to their JavaScript type equivalent. You can use tatablack's fix to disable number type cast: #12

@aleclofabbro
Copy link

@shaochuancs i can't understand how to use tatablack's fix..

@shaochuancs
Copy link

@aleclofabbro The easiest way to use his fix is directly clone from his forked repository: https://github.com/tatablack/node-properties/tree/make-casting-optional

@aleclofabbro
Copy link

👍 Thx!

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

No branches or pull requests

3 participants