Configuration store for Node.js applications.
npm add aldo-confignpm testconst Store = require('aldo-config')
// create a new store with initial values
const config = new Store({ foo: 'bar' })
console.log(config.get('foo'))
//=> 'bar'
config.set('awesome', true)
console.log(config.get('awesome'))
//=> true
// Use dot-notation to access nested properties
config.set('bar.baz', true)
console.log(config.get('bar'))
//=> {baz: true}
console.log(config.toJSON())
//=> { "foo": "bar", "awesome": true, "bar": { "baz": true } }Set an item.
Get an item, or defaultValue if undefined.
Check if an item exists.
Merge old values with the new ones.
Will set plain values and merge objects and arrays.
Set an item value to true.
If the key points to an object, a property
enabledwill be added withtruevalue.
Check whether a key's value is truthy.
Set an item value to false.
If the key points to an object, a property
enabledwill be added withfalsevalue.
Check whether a key's value is falsy.