# coffeenode-trm

> Let a Hundred Colors Glow.

Latest version **0.1.22** (published 2014-12-31) · 0 weekly downloads

## Install

```sh
npm install coffeenode-trm
pnpm add coffeenode-trm
yarn add coffeenode-trm
bun add coffeenode-trm
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.22 |
| Published | 2014-12-31 |
| First published | 2013-04-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | loveencounterflow |
| Maintainers | loveencounterflow |

## Links

- npm: https://www.npmjs.com/package/coffeenode-trm
- Repository: http://github.com/loveencounterflow/coffeenode-trm
- Homepage: https://github.com/loveencounterflow/coffeenode-trm
- Issues: https://github.com/loveencounterflow/coffeenode-trm/issues
- npm.io page: https://npm.io/package/coffeenode-trm

## Dependencies (2)

- [sync-exec](https://npm.io/package/sync-exec.md) ^0.4.0
- [coffee-script](https://npm.io/package/coffee-script.md) ~1.7.1

## Recent versions

- 0.1.22 (latest) — 2014-12-31
- 0.1.21 — 2014-12-31
- 0.1.20 — 2014-08-07
- 0.1.19 — 2014-08-07
- 0.1.18 — 2014-08-06
- 0.1.17 — 2014-06-17
- 0.1.16 — 2014-06-16
- 0.1.15 — 2014-05-18
- 0.1.14 — 2014-03-22
- 0.1.13 — 2013-11-18
- 0.1.12 — 2013-11-17
- 0.1.11 — 2013-11-17
- 0.1.10 — 2013-11-17
- 0.1.9 — 2013-11-17
- 0.1.8 — 2013-11-17
- … 6 more at https://npm.io/package/coffeenode-trm/versions

## README

- [CoffeeNode Terminal (TRM)](#coffeenode-terminal-trm)
	- [Installation & Usage](#installation-&-usage)
	- [tl;dr](#tl;dr)

> **Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*


# CoffeeNode Terminal (TRM)

## Installation & Usage

On the command line:

    npm install coffeenode-trm

In your scripts:

```coffeescript

# These lines start many of my scripts:
TRM       = require 'coffeenode-trm'
rpr       = TRM.rpr.bind TRM
echo      = TRM.echo.bind TRM
badge     = 'demo'
log       = TRM.get_logger 'plain', badge
info      = TRM.get_logger 'info',  badge
alert     = TRM.get_logger 'alert', badge
debug     = TRM.get_logger 'debug', badge
warn      = TRM.get_logger 'warn',  badge
help      = TRM.get_logger 'help',  badge

info "colors!"
alert "something went wrong"
TRM.dir ( [] )

# goes to stderr:
log TRM.gold [ 1, 2, 3, ]

# goes to stdout without the 'badge':
echo 'redirect only this part with `>`'

# `TRM.pen` (think of 'to pen a text') is like `TRM.echo`, except it does not output anything
# but returns a textual representation of its arguments:
message = TRM.pen 'do you like', ( TRM.green 'colorful' ), ( TRM.pink 'outputs' ), '?'
log message.trim()

# `rpr` (short for: 'representation') gives you a `( require 'util' ).inspect`-like output; it is applied
# by all `TRM` logging functions by default to avoid any `[object Object]` nonsense; apply it explicitly
# to get a view into strings.
log rpr 242 # same as `log 242` (true for all values except texts)

# output: demo  ▶  'do you like \u001b[38;05;34mcolorful\u001b[0m \u001b[38;05;199moutputs\u001b[0m ?\n'
log rpr message

# convert colors in the message to HTML spans.
# output: demo  ▶  do you like <span class='ansi-m-38-5-34'>colorful</span> <span class='ansi-m-38-5-199'>outputs</span> ?
log TRM.as_html message

```

## tl;dr

TRM is a library to do simplify doing colorful stuff and meaningful outputs on the command line.

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