5.0.2 • Published 5 years ago

nconf-camel-cased v5.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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' }
5.0.2

5 years ago

5.0.0

5 years ago

4.0.0

5 years ago

3.0.1

6 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago