# browser-supports-log-styles

> returns true if browser supports console log styling

Latest version **1.1.7** (published 2017-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install browser-supports-log-styles
pnpm add browser-supports-log-styles
yarn add browser-supports-log-styles
bun add browser-supports-log-styles
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2017-05-05 |
| First published | 2015-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | TJ Holowaychuk, Gregor Martynus |
| Maintainers | gr2m |
| Keywords | browser, browserify, log |

## Links

- npm: https://www.npmjs.com/package/browser-supports-log-styles
- Repository: https://github.com/gr2m/browser-supports-log-styles
- Homepage: https://github.com/gr2m/browser-supports-log-styles#readme
- Issues: https://github.com/gr2m/browser-supports-log-styles/issues
- npm.io page: https://npm.io/package/browser-supports-log-styles

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.1.7 (latest) — 2017-05-05
- 1.1.6 — 2017-02-21
- 1.1.5 — 2016-08-10
- 1.1.4 — 2016-03-22
- 1.1.3 — 2015-09-30
- 1.1.2 — 2015-09-22
- 1.1.1 — 2015-09-21
- 1.1.0 — 2015-09-21
- 1.0.0 — 2015-09-21

## README

# browser-supports-log-styles

> returns true if browser supports console log styling

[![NPM version](https://badge.fury.io/js/browser-supports-log-styles.svg)](https://www.npmjs.com/package/browser-supports-log-styles)
[![Build Status](https://travis-ci.org/gr2m/browser-supports-log-styles.svg?branch=master)](https://travis-ci.org/gr2m/browser-supports-log-styles)
[![Coverage Status](https://coveralls.io/repos/gr2m/browser-supports-log-styles/badge.svg?branch=master)](https://coveralls.io/r/gr2m/browser-supports-log-styles?branch=master)
[![Dependency Status](https://david-dm.org/gr2m/browser-supports-log-styles.svg)](https://david-dm.org/gr2m/browser-supports-log-styles)

Modern browsers support CSS-based styling of console log outputs.
See [Documentation on Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/API/Console#Styling_console_output)

### Usage

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

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

```js
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](https://github.com/visionmedia)'s fantastic [debug npm package](https://github.com/visionmedia/debug)
Original code: https://github.com/visionmedia/debug/blob/165e937e6dd529588fc3d9761d3f745969d3d054/browser.js#L28-L44

### License

MIT

---
_Source: https://npm.io/package/browser-supports-log-styles · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
