confidence-proxy
v1.0.0
Published
a node.js Proxy module for hapijs/confidence
Downloads
528
Readme
confidence-proxy
Please refer to hapijs/confidence for the details.
usage
- config.js
const confidenceProxyHandler = require('confidence-proxy');
module.exports = new Proxy({
/* confidence document */
foo: {
$filter: 'asd'
$default: {
bar: 'A'
}
}
}, confidenceProxyHandler);
- foo.js
const config = require('./config');
console.log(config.foo.bar); //A
// TODO
feature
- Support VS Code's autocompletion for the properties. Awesome!
// TODO
TODO
- add test codes
- custom criteria: now it always use
process.env
- // add more TODO