Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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"));
```