jeremyfa / yaml.js

Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: ENV-Variable support would be awesome

typoworx-de opened this issue · comments

I'm rarely searching for a node-yaml parser that can handle env-variables and variable-substitutes:

myvar: bar

config:
   foo1: ${bar}
   foo2: ${env: MY_GLOBAL_VAR}

Demo:
MY_GLOBAL_VAR=Hello node .

resulting in:

{
    myvar: "bar"
    config: {
        foo1: "bar"
        foo2: "Hello"
    }
}