Socket
Socket
Sign inDemoInstall

node-color-readline

Package Overview
Dependencies
8
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-color-readline

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


Version published
Weekly downloads
85
decreased by-47.53%
Maintainers
1
Install size
65.4 kB
Created
Weekly downloads
 

Readme

Source

node-color-readline

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

npm install --save node-color-readline

Usage:


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

Keywords

FAQs

Last updated on 13 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc