# node-color-readline

> Node.js 'readline' alternative with support for coloured syntax highlighting and suggestions

Latest version **1.0.1** (published 2016-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-color-readline
pnpm add node-color-readline
yarn add node-color-readline
bun add node-color-readline
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-13 |
| First published | 2015-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Anthony Foster |
| Maintainers | aantthony |
| Keywords | readline, highlight, syntax, colors, repl |

## Links

- npm: https://www.npmjs.com/package/node-color-readline
- Repository: https://github.com/aantthony/node-color-readline
- Homepage: https://github.com/aantthony/node-color-readline#readme
- Issues: https://github.com/aantthony/node-color-readline/issues
- npm.io page: https://npm.io/package/node-color-readline

## Dependencies (2)

- [ansi](https://npm.io/package/ansi.md) ^0.3.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.1

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-04-13
- 1.0.0 — 2015-08-30

## README

# node-color-readline
Node.js 'readline' alternative with support for coloured syntax highlighting and suggestions.

```sh
npm install --save node-color-readline
```

Usage:

```js

var colorReadline = require('node-color-readline');
var chalk = require('chalk');
var repl = colorReadline.createInterface({
  input: process.stdin,
  output: process.stdout,
  colorize: function (str) {
    // Make all occurences of 'e' red.
    return str.replace(/e/g, function (match) {
      return chalk.red(match);
    });
  }
});

repl.on('line', function (cmd) {
  console.log('LINE:', cmd);
});

repl.prompt();
```

![Screenshot](./terminal.gif)

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