Package Exports
- kons
Readme
kons
An elegant console logger for Node.js.
Features
- Tiny (Minified + Gzipped ≈ 0.1kB). Beautiful. Easy to use.
- Customizable.
- TypeScript type declarations included.
NO_COLORfriendly.
Installation
# NPM
$ npm install kons
# Yarn
$ yarn add kons
# PNPM
$ pnpm add konsUsage
import { error, info, log, success, warn } from "kons";
log("Hello World!");
info("This is kons!");
warn("Warning!");
error("Error!");
success("Success!");Output:

Advanced Usage
import { createLogType } from "kons";
// Parameter 1: Log type
// Parameter 2: Log color, see [picocolors](https://npmjs.com/package/picocolors) for available colors
// Parameter 3?: Log target, a function that accepts a string
const myLog = createLogType("myLog", "cyan", console.info);