New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

omg-console

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omg-console

A better console.log for terminal

latest
npmnpm
Version
1.2.2
Version published
Weekly downloads
43
437.5%
Maintainers
1
Weekly downloads
 
Created
Source

omg-console

使用

npm install omg-console -save
import Console from 'omg-console'
const console = new Console('my namespace')
console.log('hello world')

Options

new Console('my namespace')
new Console({name: 'xxx', verbose: true})

单例模式

import { console } from 'omg-console'
console.log('xxx') // singleton

import { rawConsole } from 'omg-console'
rawConsole // original global.console

全局调试

# 全局环境变量
export OMG_CONSOLE_VERBOSE=true

特性

  • 全功能的 console 替代方案,支持所有原生 console 方法
  • 常用方法颜色高亮
  • 错误会走到 stderr 流
  • 支持回溯到源码对应行
  • 支持 sourcemap

Keywords

color

FAQs

Package last updated on 16 Sep 2020

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