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

browser-supports-log-styles

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

browser-supports-log-styles

returns true if browser supports console log styling

  • 1.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
499
increased by166.84%
Maintainers
1
Weekly downloads
 
Created
Source

browser-supports-log-styles

returns true if browser supports console log styling

NPM version Build Status Coverage Status Dependency Status

Modern browsers support CSS-based styling of console log outputs. See Documentation on Mozilla Developer Network

Usage

Download latest version here: https://wzrd.in/standalone/browser-supports-log-styles

Or install via npm: npm install -S browser-supports-log-styles

if (browserSupportsLogStyles()) {
  console.log('%cLOG%c styling supported', 'color: white; padding: .2em .5em; border-radius: 1em; background-color: blue', 'color: inherit')
} else {
  console.log('styling not supported')
}

Current Browser Support

  • Chrome
  • Safari
  • Firefox >= v31

Credit

Takend from TJ Holowaychuk @visionmedia's fantastic debug npm package Original code: https://github.com/visionmedia/debug/blob/165e937e6dd529588fc3d9761d3f745969d3d054/browser.js#L28-L44

License

MIT

Keywords

FAQs

Package last updated on 21 Feb 2017

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