nconf-camel-cased
TypeScript icon, indicating that this package has built-in type declarations

5.0.2 • Public • Published

nconf-camel-cased

This is useful for when the env-keys need to be nested and still camel cased.

For example (starting application in shell):

SOME__NESTED__CONFIG__IN_CAMEL_CASE=ok \
SOME__NESTED__SECOND_VALUE=bar \
node index

... will be be transformed into (result in javascript):

{
  some: {
    nested: {
      config: {
        inCamelCase: 'ok',
      },
      secondValue: 'bar'
    }
  }
}

Usage

const config = require('nconf-camel-cased')({
  file: {
    dir: './'
  }
})
 
config.defaults = {
  foo: {
    bar: 'bar'
  },
  baz: 'results'
}
 
console.log(config.get('foo')) // > { bar: 'bar' }

Readme

Keywords

none

Package Sidebar

Install

npm i nconf-camel-cased

Weekly Downloads

9

Version

5.0.2

License

ISC

Unpacked Size

14 kB

Total Files

20

Last publish

Collaborators

  • ankjevel