@iteam/config
v12.1.2
Published
[](https://github.com/Iteam1337/config/actions?workflow=Release) [](https://badge.fury.io/js/%40iteam%2Fconfig)
Downloads
2,926
Keywords
Readme
Config
This is useful when environment variables need to be nested and still be camel cased.
Documentation
Full documentation is found at Iteam Config
Installation
npm install @iteam/configor use supreme to install and set up config files automatically:
npx @iteam/supreme add configSimple usage
const config = require('@iteam/config')({
file: `${__dirname}/../config.json`,
defaults: {
foo: {
bar: 'baz',
},
baz: [1, 2, 3],
},
})
config.get('foo') // { bar: 'baz' }
config.get('foo:bar') // 'baz'
config.get('baz') // [ 1, 2, 3 ]