Socket
Socket
Sign inDemoInstall

kons

Package Overview
Dependencies
4
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    kons

An elegant console logger.


Version published
Weekly downloads
352
decreased by-0.85%
Maintainers
1
Install size
61.2 kB
Created
Weekly downloads
 

Readme

Source

kons

NPM version

An elegant console logger.

Features

  • Tiny (Minified + Gzipped ≈ 0.1kB). Beautiful. Easy to use.
  • Customizable.
  • TypeScript type declarations included.
  • NO_COLOR friendly.

Installation

# NPM
$ npm install kons -S

# Yarn
$ yarn add kons

# PNPM
$ pnpm add kons

Usage

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 { 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" });

License

MIT License © 2022 Ray

Keywords

FAQs

Last updated on 22 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc