An elegant console logger.
npm install kons
An elegant console logger.
- Tiny (Minified + Gzipped ≈ 0.1kB). Beautiful. Easy to use.
- Customizable.
- TypeScript type declarations included.
- NO_COLOR friendly.
``consoleNPM
$ npm install kons -S
Usage
`ts
import { error, info, log, success, warn } from "kons";log("Hello World!");
info("This is kons!");
warn("Warning!");
error("Error!");
success("Success!");
`Output:

$3
`ts
import { createFormatter } from "kons";// Parameter 1: Log type
// Parameter 2: Log background color, see picocolors for available colors
// Parameter 3?: Log options, see types for more information
const myLog = createFormatter("myLog", "cyan", { target: console.info, textColor: "green" });
``