confidence-proxy
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i confidence-proxy

    Weekly Downloads

    98

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.59 kB

    Total Files

    5

    Last publish

    Collaborators

    • dolsup