# @xhudaman/ws-console

> Console override for sending logs to a websocket server.

Latest version **0.2.0** (published 2022-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xhudaman/ws-console
pnpm add @xhudaman/ws-console
yarn add @xhudaman/ws-console
bun add @xhudaman/ws-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.2.0 |
| Published | 2022-11-10 |
| First published | 2022-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xhudaman |
| Maintainers | xhudaman |

## Links

- npm: https://www.npmjs.com/package/@xhudaman/ws-console
- npm.io page: https://npm.io/package/@xhudaman/ws-console

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21

## Recent versions

- 0.2.0 (latest) — 2022-11-10
- 0.1.0 — 2022-11-08

## README

# ws-console

Console override for sending logs to a websocket server.

## How to use

### Installation

#### pnpm

```bash
  pnpm add @xhudaman/ws-console
```

#### npm

```bash
  npm i -s @xhudaman/ws-console
```

#### yarn

```bash
  yarn add @xhudaman/ws-console
```

### Example Usage

```js
import WSConsole from "@xhudaman/ws-console";

const wsConsole = WSConosle({
  // Use the address of your debug server if it differs from the example
  debugServerUrl: "ws://localhost:3001",
  enableInProduction: true,
});
```

### Configuration

|                Key                | Required | Default Value |                                 Accepted Values                                 |
| :-------------------------------: | :------: | :-----------: | :-----------------------------------------------------------------------------: |
|          debugServerUrl           |  `true`  |      N/A      | Any valid WebSocket URL. For example: `ws://domain:port` or `wss://domain:port` |
|        enableInProduction         | `false`  |    `false`    |                                `true` or `false`                                |
|      enableConsoleOverrides       | `false`  |    `true`     |                                `true` or `false`                                |
| disablePassthroughToNativeConsole | `false`  |    `false`    |                                `true` or `false`                                |

> **Warning**: If you are using this package on the Switch in the `skyline-web` browser, you **must** set `disablePassthroughToNativeConsole` to `true` or it will block the remainder of the code running in the same scope.

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