Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

console-format

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-format

format console print

npmnpm
Version
2.2.11
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

console-format

Introduce

This package is a tool can format console output. Origin console method has been stored in window.nativeConsole or global.nativeConsole. The effect like as follows:

console.log('log');
console.info('info');
console.debug('debug');
console.warn('warn');
console.error('error');
[2021-06-03 11:25:07.930] [LOG] [59764][/Users/charm/Documents/projects/console-format/test.js:3]   log
[2021-06-03 11:22:07.933] [INFO] [59489][/Users/charm/Documents/projects/console-format/test.js:3]   info
[2021-06-03 11:22:07.945] [DEBUG] [59489][/Users/charm/Documents/projects/console-format/test.js:4]   debug
[2021-06-03 11:22:07.945] [WARN] [59489][/Users/charm/Documents/projects/console-format/test.js:5]   warn
[2021-06-03 11:22:07.947] [ERROR] [59489][/Users/charm/Documents/projects/console-format/test.js:6]   error

Usage

npm i console-format
const consoleFormat = require('console-format)
consoleFormat()

console.log("put your log here");

Functions

This tools only format console.log console.info, console.warn and console.error, other console method still as origin console style.

Origin console has been stored in global.nativeConsole.

To experience magic effect, just run npm run test

Keywords

console

FAQs

Package last updated on 09 Dec 2021

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