# @rc-utils/consoles

> ## 安装

Latest version **1.0.3-rc.1** (published 2022-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rc-utils/consoles
pnpm add @rc-utils/consoles
yarn add @rc-utils/consoles
bun add @rc-utils/consoles
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3-rc.1 |
| Published | 2022-10-10 |
| First published | 2022-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | char-big-bear |
| Keywords | console, Console |

## Links

- npm: https://www.npmjs.com/package/@rc-utils/consoles
- Homepage: https://gitee.com/fightBear_admin/rc-utils#readme
- Issues: https://gitee.com/fightBear_admin/rc-utils/issues
- npm.io page: https://npm.io/package/@rc-utils/consoles

## Recent versions

- 1.0.3-rc.1 (latest) — 2022-10-10
- 1.0.2 (next) — 2022-10-10
- 1.0.1-alpha.3 — 2022-07-15
- 1.0.1-alpha.2 — 2022-07-13
- 1.0.1-alpha.1 — 2022-07-13
- 1.0.1 — 2022-07-13

## README

# @rc-utils/consoles

## 安装

使用 npm:

```bash
$ npm i -g npm
$ npm i @rc-utils/consoles
```

## 使用方法

> 直接引用 `import console from '@rc-utils/consoles'` ,用法与原生 `console` 一致，在`console`的基础上扩展`warning`/`note`等开发调试方法

```tsx
import console, {
  note,
  noteOnce,
  warning,
  warningOnce,
} from '@rc-utils/consoles'
import React, { useEffect, useState } from 'react'
import ReactDOM from 'react-dom'

const App = () => {
  useEffect(() => {
    // // 配置开启控制台输出
    // window.enableConsole = false
    // // 配置开启输出时间
    // window.consoleTime = true

    warning(false, `当前输出模式: warning`)

    note(false, `当前输出模式: note`)

    warningOnce(false, `当前输出模式: warningOnce`)

    noteOnce(false, `当前输出模式: noteOnce`)

    warningOnce(false, `当前输出模式: warningOnce`)

    noteOnce(false, `当前输出模式: noteOnce`)

    console.group('分组输出')
    console.log('这一句是日志语句')
    console.info('这一句是信息语句')
    console.warn('这一句是告警语句')
    console.error('这一句是异常语句')
    console.groupEnd()
  }, [])

  return <div>请打开浏览器控制台查看输出</div>
}

ReactDOM.render(<App />, document.getElementById('root'))
```

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