thesimj / envyaml

Simple YAML configuration file parser
MIT License
78 stars 21 forks source link

Escape variables #14

Closed ethlo closed 3 years ago

ethlo commented 3 years ago

Thanks for this nice little library! I have the need to use $.foo as a value, and this gets picked up and attempted to be replaced with an env variable. Is there any way to escape variables? Thanks!

thesimj commented 3 years ago

Hi, hmm interesting request 🤔. i will use $$ double dollar sign to escape variables, then this example test_escape: $$.foo will give you a result as

env['test_escape']
>> $.foo

if this ok, then i will update main module and increase version. thanks for this suggestion.