Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logdecor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logdecor

This library is just for all JS lovers out there to see the logs in style

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

This library is just for all JS lovers out there to see the logs in style. All React-Native developers, try this on your debugger

Installation

$ npm install logdecor

Usage

Import stylelog

import $ from 'logdecor'

Available Methods

$.log() Parameters: text ,color-code

	$.log("Log this text") //Simply logs the content
	$.log("Log this text","#00bcd4") //Logs it in specific color code
	

$.logAll() Last argument must be a color code (optional)

	$.logAll("Log this text",{name:"Sync"},$.color.chocolate) 
	//Logs the text in chocolate color and logs the rest of the elements
	

$.logTitle() Displays the text in stylelog logo style

	$.logTitle('stylelog');
	//Logs the text in styleog logo style
	


$.logLego() Displays the text in stylelog logo style but in custom color

	$.logLego("DEV","#d91f26","#d91f26","#a622ab");
	//Logs the text in styleog logo style (custom color)
	

$.logImage() Displays the image in log. It supports both PNG, JPEG & GIF

	$.logImage("http://domain.com/img.png");
	//Displays the image in chrome console
	$.logImage("Show Text","http://domain.com/img.png");
	//Pass text as optional
	


$.logInStyle() Pass the text to display and CSS Style

	$.logInStyle("text to display","font-size: 50px;color:'#00bcd4'");
	//This will show the text in given style
	

$.logTable() Displays the JS object & array in table format

	$.logTable([{name:"Anooj",department:"Mobile"},{name:"Sarthak",department:"R & D"},{name:"Jyothi",department:"Mobile"}])
	


$.logObjectJSON() Converts object to JSON string and logs it in style

	$.logObjectJSON({j:'kk',l:'ku'},$.color.rebeccapurple);
	//Displays the stringified version of object in console
	

$.logJSONObject() Converts JSON string to object and logs it

	$.logObjectJSON({"j":"kk","l":"ku"});
	//Displays the parsed version of json string in console
	

$.logObjectKeys() Displays all keys in an object

	$.logObjectKeys({"j":"kk","l":"ku"});
	//Displays the array of keys in console
	//["j","l"]
	

$.flipObject() Flips keys to values & values to keys

	$.flipObject({"j":"kk","l":"ku"});
	//Displays the array of keys in console
	//{"kk":"j","ku":"l"}
	

Keywords

FAQs

Package last updated on 17 Jul 2019

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