# @snickbit/out

> Cross-platform pretty output for your terminal or browser console.

Latest version **2.2.1** (published 2024-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @snickbit/out
pnpm add @snickbit/out
yarn add @snickbit/out
bun add @snickbit/out
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2024-05-14 |
| First published | 2022-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16 |
| Dependencies | 7 |
| Unpacked size | 54 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | snickbit |

## Links

- npm: https://www.npmjs.com/package/@snickbit/out
- npm.io page: https://npm.io/package/@snickbit/out

## Dependencies (7)

- [@snickbit/ansi](https://npm.io/package/@snickbit/ansi.md) 0.0.26
- [@snickbit/cycle](https://npm.io/package/@snickbit/cycle.md) 1.0.22
- [browser-or-node](https://npm.io/package/browser-or-node.md) 2.1.1
- [picomatch-browser](https://npm.io/package/picomatch-browser.md) 2.2.6
- [@snickbit/utilities](https://npm.io/package/@snickbit/utilities.md) 3.11.1
- [ansi-styles-template](https://npm.io/package/ansi-styles-template.md) 1.0.0
- [node-inspect-extracted](https://npm.io/package/node-inspect-extracted.md) 3.0.0

## Recent versions

- 2.2.1 (latest) — 2024-05-14
- 2.2.0 — 2023-07-30
- 2.1.4 — 2023-07-19
- 2.1.3 — 2023-07-16
- 2.1.2 — 2023-04-28
- 2.1.1 — 2023-04-28
- 2.1.0 — 2023-04-28
- 2.0.48 — 2022-10-04
- 2.0.47 — 2022-10-04
- 2.0.46 — 2022-10-03
- 2.0.45 — 2022-10-02
- 2.0.44 — 2022-09-30
- 2.0.43 — 2022-09-29
- 2.0.42 — 2022-09-11
- 2.0.41 — 2022-09-11
- … 36 more at https://npm.io/package/@snickbit/out/versions

## README

# @snickbit/out

Cross-platform pretty output for your terminal or browser console.

## Installation

```bash
pnpm add @snickbit/out
```

```bash
npm add @snickbit/out
```

## Usage

Simply import the `out` function and call it with your message.

```js
import out from '@snickbit/out'

// Multiple import/require options
// import {out} from '@snickbit/out';
// const out = require('@snickbit/out');

out('Standard out')
out.info('Info log')
out.info('Info log', 'with multiple', 'arguments')
out.info('Info log', 'long', 'with multiple', 'arguments', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque suscipit sed velit sit amet laoreet. Fusce et nisl vel nunc pulvinar aliquam. Maecenas euismod dui tortor, ut fermentum ex interdum ut. Integer a facilisis felis, sed posuere massa. Curabitur suscipit semper ligula eu tristique. Curabitur dictum eros ac mattis vulputate. Donec dictum mauris sed ipsum vulputate, vitae congue dui mollis. Maecenas pulvinar eleifend blandit.')
out.info('Info log', 'with different', {message: 'Variable types'})
out.info.broken.log('Info log', 'with multiple', 'arguments', 'broken')
out.warn('This is a warning log')
out.verbose.warn.success('This is verbose warning success')
out.verbose.success.warn('This is verbose success warning ')
out.block.warn('This is a block warning log')
out.block.warn('This is a block warning log')
out.block.heading('my heading').debug('This is a block debug log with a heading')
out.heading('non block heading').info('hello')
out.block('my block')
out.verbose.text('Verbose text')
out.info('Inspecting object', out)
```

### Browsers

In browsers, you just need to include it in your document somewhere and an instance of `out` is created and attached to the `window` object so it can be used globally in most environments.

```html

<html lang="en">
<head>
	<script src="../lib/index.js" type="text/javascript"></script>
	<title></title>
</head>
<body>
<div>My Out testing page</div>
<script lang="js">
	out.write('Hello, world!')
	window.out.info('I love out!')
</script>
</body>
</html>
```

## Browser

<img src="assets/browser.png" alt="browser screenshot" />

## Terminal

<img src="assets/terminal.png" alt="terminal screenshot" />

## Documentation

### [API Docs](https://github.com/snickbit/out/blob/main/docs/README.md)

### [CHANGELOG](https://github.com/snickbit/out/blob/main/CHANGELOG.md)

## License

Copyright (c) 2022 - **Nicholas Lowe** aka **Snickbit**

[MIT License](https://github.com/snickbit/out/blob/main/LICENSE)

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