Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mesalilac/conf-ts
load and parse config files.
https://github.com/mesalilac/conf-ts
Last synced: about 1 month ago
JSON representation
load and parse config files.
- Host: GitHub
- URL: https://github.com/mesalilac/conf-ts
- Owner: mesalilac
- License: mit
- Created: 2022-06-07T23:00:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T11:10:39.000Z (over 2 years ago)
- Last Synced: 2024-05-06T06:21:42.881Z (8 months ago)
- Language: TypeScript
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Syntax
```
# Comment!# Group of settings
[main]host = localhost
port = 4000```
## Api
```ts
import { Config } from "conf-ts";const config = new Config({
// Path to config file
file_name: "path/to/config",// Default config to rewrite config file
default: `
# Comment1!
/ Comment2!
" Comment3!# Group of settings
[main]
host = localhost
port = 4000`,
});console.log(config.get("main.host"));
console.log(config.get("main.port"));
```