New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cmlog

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmlog

Emoji console logger

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Cmlog

NPM version NPM downloads

✏️ Emoji console logger

Installation

Using yarn:

$ yarn add cmlog

Using npm:

$ npm i cmlog

Getting started

import cmlog from "cmlog"

// See types section for all available types
cmlog.debug('export something')
cmlog.warn('Something is going to happen soon')
cmlog.success('Build succeeed in 10 seconds')
cmlog.info('Some extra info is here')
cmlog.error(new Error('Foo'))

preview

Types

A list of all available default types:

  • cmlog.success(...str)
  • 🔵 cmlog.info(...str)
  • 😥 cmlog.warn(...str)
  • 🐛 cmlog.debug(...str)
  • cmlog.waitting(...str)
  • 🔥 cmlog.boosting(...str)
  • 👶 cmlog.start(...str)
  • cmlog.done(...str)
  • 📦 cmlog.pack(title, ...str)
  • cmlog.module(title, ...str)
  • cmlog.error(Error)

Split / Blank

  • cmlog.split(char, count)
  • cmlog.blank(lines)
// default: char = "="; count = 40
cmlog.split()

// output:
// =========================================

// default: lines = 1;
cmlog.blank()

Log object

  • cmlog.json(obj, title)
cmlog.json("{foo:bar}","Format")

Terminal log:

⚪ Format
  {
    foo: bar
  }

Dye string

  • cmlog.dye(color, ...str)

return: string

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray
  • redBright
  • greenBright
  • yellowBright
  • blueBright
  • magentaBright
  • cyanBright
  • whiteBright

Config

import { Cmlog } from "cmlog"

// default config
const cmlog = new Cmlog({
      align    : true, // whether to align info
      maxLength: 8, // (align:true) the max spacings to add
      debug    : true, // whether to show debug log
      time     : false // whether to show time info
})

License

MIT

Keywords

FAQs

Package last updated on 03 Jul 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc