# @jsmini/console

> console.js is a small javascript library, fix console is undefined

Latest version **0.8.0** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsmini/console
pnpm add @jsmini/console
yarn add @jsmini/console
bun add @jsmini/console
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.0 |
| Published | 2023-11-21 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 35.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 5 |
| Author | yanhaijing |
| Maintainers | yanhaijing |
| Keywords | console, console.js, console-shim, console-polyfill |

## Links

- npm: https://www.npmjs.com/package/@jsmini/console
- Repository: https://github.com/jsmini/console
- Homepage: https://github.com/jsmini/console#readme
- Issues: https://github.com/jsmini/console/issues
- npm.io page: https://npm.io/package/@jsmini/console

## Recent versions

- 0.8.0 (latest) — 2023-11-21
- 0.7.0 — 2023-09-24
- 0.6.0 — 2018-04-09

## README

# [console](https://github.com/jsmini/console)

[![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jsmini/console/blob/master/LICENSE)
[![CI](https://github.com/jsmini/console/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jsmini/console/actions/workflows/ci.yml)
[![npm](https://img.shields.io/badge/npm-0.8.0-orange.svg)](https://www.npmjs.com/package/@jsmini/console)
[![NPM downloads](http://img.shields.io/npm/dm/@jsmini/console.svg?style=flat-square)](http://www.npmtrends.com/@jsmini/console)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/jsmini/console.svg)](http://isitmaintained.com/project/jsmini/console 'Percentage of issues still open')

console.js is a small javascript library, fix console is undefined, like html5shim and reset.css.

In ie6 ie7,console is undefined. In ie8 ie9, first open the developer tools before, console is undefined.

## Guides

Download and install through the npm

```bash
$ npm install --save @jsmini/console
```

If you are use webpack

```js
import { polyfill } from '@jsmini/console';

polyfill(); // polyfill console undefined
```

If you are use requirejs

```js
requirejs(
  ['node_modules/@jsmini/console/dist/index.aio.js'],
  function (console_js) {
    var polyfill = console_js.polyfill;

    polyfill(); // polyfill console undefined
  },
);
```

If you are use browser

```html
<script src="node_modules/@jsmini/console/dist/index.aio.js"></script>

<script>
  var polyfill = console_js.polyfill;

  polyfill(); // polyfill console undefined
</script>
```

## Document

[API](https://github.com/jsmini/console/blob/master/doc/api.md)

## Principle & Blog

[use console.js](http://yanhaijing.com/js/2014/11/03/use-console.js/)

## Contribution

The first run requires installation of dependencies

```bash
$ npm install
```

Build code

```bash
$ npm run build
```

Run unit test, the browser environment requires manual test, in `test/browser`

```bash
$ npm test
```

Update package.json version，update README.md version，update CHANGELOG.md，then release

```bash
$ npm run release
```

Push to npm

```bash
$ npm publish --access=public
```

You may need to modify it as follows：

- README.md
- package.json
- config/rollup.js
- test/browser/index.html

## CHANGELOG

[CHANGELOG.md](https://github.com/jsmini/console/blob/master/CHANGELOG.md)

## TODO

[TODO.md](https://github.com/jsmini/console/blob/master/TODO.md)

## Who use

## Refrence

- [MSDN](http://msdn.microsoft.com/en-us/library/ie/gg589530.aspx)
- [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Console)
- [Firebug](http://getfirebug.com/wiki/index.php/Console_API)

## Related projects

- [browser-shim](https://github.com/ishmaelthedestroyer/browser-shim)
- [console-shim(liamnewmarch)](https://github.com/liamnewmarch/console-shim)
- [console-shim(kayahr)](https://github.com/kayahr/console-shim)
- [console-polyfill](https://github.com/paulmillr/console-polyfill)
- [consolex.js](https://github.com/deadlyicon/consolex.js/blob/master/src/consolex.js)

---
_Source: https://npm.io/package/@jsmini/console · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
