Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

ansi-html-community

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

ansi-html-community

An elegant lib that converts the chalked (ANSI) text to HTML. (Community)

    0.0.8latest

Version published
Maintainers
1
Weekly downloads
9,036,326
decreased by-15.76%

Weekly downloads

Readme

Source

ansi-html NPM version Build Status

An elegant lib that converts the chalked (ANSI) text to HTML.

Coverage

  • All styles of chalk (100%) and colors.
  • There are over 150 randomized test cases under test.

Installation

$ npm install ansi-html-community

Usage

var ansiHTML = require('ansi-html-community'); var str = ansiHTML('[ANSI_TEXT]');

e.g.:

var chalk = require('chalk'); var str = chalk.bold.red('foo') + ' bar'; console.log('[ANSI]', str) console.log('[HTML]', ansiHTML(str));

See complete examples under test / examples directory.

Set Colors

ansiHTML.setColors({ reset: ['555', '666'], // FOREGROUND-COLOR or [FOREGROUND-COLOR] or [, BACKGROUND-COLOR] or [FOREGROUND-COLOR, BACKGROUND-COLOR] black: 'aaa', // String red: 'bbb', green: 'ccc', yellow: 'ddd', blue: 'eee', magenta: 'fff', cyan: '999', lightgrey: '888', darkgrey: '777' });

Reset

ansiHTML.reset();

Exposed Tags

var openTags = ansiHTML.tags.open; var closeTags = ansiHTML.tags.close;

Test

$ npm install -l $ npm test

Keywords

FAQs

What is ansi-html-community?

An elegant lib that converts the chalked (ANSI) text to HTML. (Community)

Is ansi-html-community popular?

The npm package ansi-html-community receives a total of 7,279,473 weekly downloads. As such, ansi-html-community popularity was classified as popular.

Is ansi-html-community well maintained?

We found that ansi-html-community demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 05 Sep 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc