An elegant console logger.
- Tiny (Minified + Gzipped ≈ 0.1kB). Beautiful. Easy to use.
- Customizable.
- TypeScript type declarations included.
NO_COLOR
friendly.
# NPM
$ npm install kons -S
# Yarn
$ yarn add kons
# PNPM
$ pnpm add kons
import { error, info, log, success, warn } from "kons";
log("Hello World!");
info("This is kons!");
warn("Warning!");
error("Error!");
success("Success!");
Output:
import { createFormatter } from "kons";
// Parameter 1: Log type
// Parameter 2: Log background color, see [picocolors](https://npmjs.com/package/picocolors) for available colors
// Parameter 3?: Log options, see types for more information
const myLog = createFormatter("myLog", "cyan", {
target: console.info,
textColor: "green",
});