optimal.js
v0.0.2
Published
A simple configuration parser for node
Readme
Optimal.js
A simple options parser for node that can get options from different sources.
Example:
import optimal from 'optimal'
const opts = optimal('prefix', { config: 'config-file' })
const v = opts.option('foo')
.type('integer')
.description('foo is an integer')
.required()
.get()If run, this script would try to get the foo option from these locations:
- the
--fooparameter - a key named foo in the config file pointed to by the
config-fileoption - the
PREFIX_FOOenvirnment variable
The value will be parsed and ready to use!
Docs
To do!
