@biorate/config
v1.76.3
Published
Application configurator
Downloads
104
Readme
Config
Application configurator
Examples:
Get / Set:
import { Config } from '@biorate/config';
const config = new Config();
config.set('a', 1);
console.log(config.get('a')); // 1
Has:
import { Config } from '@biorate/config';
const config = new Config();
config.set('a', 1);
console.log(config.has('a')); // true
console.log(config.has('b')); // false
Merge:
import { Config } from '@biorate/config';
const config = new Config();
config.merge({
a: { b: { c: 1 } },
});
config.merge({
a: { b: { d: 2 } },
});
console.log(config.has('a')); // true
console.log(config.has('a.b')); // true
console.log(config.get('a.b.c')); // 1
console.log(config.get('a.b.d')); // 2
Learn
- Documentation can be found here - docs.
Release History
See the CHANGELOG
License
Copyright (c) 2021-present Leonid Levkin (llevkin)