I have a NodeJS app that takes a YAML file for configuration, the YAML file uses snake notation like so:foo: bar: something another_foo: another_bar: something The Javascript files use camelcase notation in function and variable declarations, the problem is when I use import the setting using js-yaml, and have to access the imported parameters like so settings.another_foo.another_bar, since it clashes with the notation used in the rest of the JavaScript file.Should I drop using YAML and use JSON for the setting files?Or is there a way to get camelcase notation from a YAML file using snake notation?Would it be appropriate to have one notation for setting files and something different for the same parameters in code?
Submitted October 13, 2018 at 02:30PM by rraallvv
No comments:
Post a Comment