@biorate/config
TypeScript icon, indicating that this package has built-in type declarations

1.76.3 • Public • Published

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

MIT

Copyright (c) 2021-present Leonid Levkin (llevkin)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.76.3
    15
    • latest

Version History

Package Sidebar

Install

npm i @biorate/config

Weekly Downloads

16

Version

1.76.3

License

MIT

Unpacked Size

184 kB

Total Files

38

Last publish

Collaborators

  • llevkin