@ttoss/read-config-file
v2.0.6
Published
Read a configuration file
Downloads
309
Readme
@ttoss/read-config-file
This package is a simple utility to read a configuration file in multiple formats:
- .json
- .yaml / .yml
- .js
- .ts
ESM Only
This package is ESM only.
Installation
pnpm add @ttoss/read-config-file
Usage
import { readConfigFile, readConfigFileSync } from '@ttoss/read-config-file';
const config1 = await readConfigFile({ configFilePath: 'path/to/config.json' });
const config2 = readConfigFileSync({
configFilePath: 'path/to/config.json',
});