# niceuho

> auto format console output with [chalk](https://github.com/chalk/chalk) for node

Latest version **0.0.3** (published 2018-11-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install niceuho
pnpm add niceuho
yarn add niceuho
bun add niceuho
```

## 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.0.3 |
| Published | 2018-11-02 |
| First published | 2018-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 22 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wcastand |
| Maintainers | wcastand |

## Links

- npm: https://www.npmjs.com/package/niceuho
- npm.io page: https://npm.io/package/niceuho

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1

## Recent versions

- 0.0.3 (latest) — 2018-11-02
- 0.0.2 — 2018-11-02
- 0.0.1 — 2018-11-02

## README

# niceuho
auto format console output with [chalk](https://github.com/chalk/chalk) for node

console.log, .info, .warn, .error doesn't have a specific color scheme in a terminal with node. (it exists mostly to miror console api for browser)

So i created a simple package that use `chalk` to add some colors and style to console's api for node.

# Install
```
$ npm install niceuho
// or
$ yarn add niceuho
```

# Usage

### Default config

```javascript

require('niceuho')

console.log("Hello") // output white Hello by default
console.warn('Warning !') // output yellow Warning ! by default
```

### Custom config

```javascript

require('niceuho')({ log : 'blue', error : ['bold', 'underline', 'red'] })

console.log("Hello") // output blue Hello
console.error('Error !') // output "Error !" in bold red and underlined
```

You can use all the modifiers from [chalk](https://github.com/chalk/chalk) in the custom (accept a string or an array of string)
In the config you can customize log, info, warn and error.

### Warning

In order to get a proper formatting you have some constraints.
If you want to show an object for example you'll have to use the node's util format syntax.

`console.log("object : %o", myobj)`

You can find ore information here : [util](https://nodejs.org/api/util.html#util_util_format_format_args)

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