ts-command-line-args
ts-command-line-args copied to clipboard
feat: add option to lookup from env variable
As requested and specified in #30
An Option's value, in order of increasing precedence, is taken from:
- the Option's
defaultValue - the value from a config file
- the value from the Option's
envvariable 🆕 - the value from the command line
Values from process.env are parsed as if they were specified on the command line.
@Roaders I took a stab at #30. Thanks for maintaining this cool library!
Thanks for the PR. I will try to get round to taking a proper look at it soon.