npm.io
2.2.1 • Published 5d ago

@logtape/config

Licence
MIT
Version
2.2.1
Deps
0
Size
64 kB
Vulns
0
Weekly
1.4K

@logtape/config

JSR npm

This package provides functionality to configure LogTape from plain objects, such as those loaded from JSON or YAML files.

Installation

The package is available on JSR and npm:

deno add jsr:@logtape/config
npm  add     @logtape/config
pnpm add     @logtape/config
yarn add     @logtape/config
bun  add     @logtape/config

Usage

You can configure LogTape using a plain object:

import { configureFromObject } from "@logtape/config";
import { readFile } from "node:fs/promises";

const config = JSON.parse(await readFile("./logtape.json", "utf-8"));
await configureFromObject(config);

For more details, see the Configuration from objects section in the LogTape manual.

Keywords