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

2.0.6 • Public • Published

@ezweb/ts-config-loader

npm version

JSON files loader & watcher

Installation

npm i @ezweb/ts-config-loader

Usage

type DbConfig = { db: { host: string; port: number, password?: string }[] };
const config = new ConfigLoader([`directory/base.json`, `directory/env-override.json`], { verbose: true });
const dbConfig = config.get<DbConfig>('db');
config.addObserver<DbConfig>('db', (all) => {
    // changed
});

Readme

Keywords

none

Package Sidebar

Install

npm i @ezweb/ts-config-loader

Weekly Downloads

0

Version

2.0.6

License

ISC

Unpacked Size

6.83 kB

Total Files

6

Last publish

Collaborators

  • ezweb-tech
  • arsonik