Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tty2html

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty2html

convert console colors output to html tags

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

tty2http

This is a stream middleware for visualization results from color console output to HTML

Installation

npm --save i tty2http

Example

run from root of module npm i && npm test

convert colorized console output of commend diff tty2html.js test.js --color=always to html

with ability for stream support and show this result online

var fs=require('fs');
var spawn = require('child_process').spawn;
var tty2html=require('tty2html');

var output=fs.createWriteStream('stream.html') // or it is can be Express.js Response stream
output.write('<pre>'); //for a \t indentation support

var t2h=tty2html(/* tagName or 'span' as default */);
t2h.pipe(output);

var child = spawn('diff',['tty2html.js','test.js','--color=always'] );
child.stdout.pipe(t2h);
child.stderr.pipe(t2h);

Keywords

FAQs

Package last updated on 27 May 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc