An elegant lib that converts the chalked text to HTML.
Installations
npm install ansi-html-community
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.8.0
NPM Version
7.21.0
Score
99.9
Supply Chain
85.8
Quality
75.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
1,590,504,129
Last Day
2,372,812
Last Week
11,992,361
Last Month
39,181,287
Last Year
585,777,136
GitHub Statistics
19 Stars
36 Commits
1 Forks
3 Watching
4 Branches
1 Contributors
Bundle Size
2.09 kB
Minified
1.10 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.8
Package Id
ansi-html-community@0.0.8
Size
7.32 kB
NPM Version
7.21.0
Node Version
16.8.0
Publised On
05 Sept 2021
Total Downloads
Cumulative downloads
Total Downloads
1,590,504,129
Last day
6.9%
2,372,812
Compared to previous day
Last week
12.3%
11,992,361
Compared to previous week
Last month
-26.2%
39,181,287
Compared to previous month
Last year
6.1%
585,777,136
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
ansi-html
An elegant lib that converts the chalked (ANSI) text to HTML.
Coverage
Installation
$ npm install ansi-html-community
Usage
1var ansiHTML = require('ansi-html-community'); 2var str = ansiHTML('[ANSI_TEXT]');
e.g.:
1var chalk = require('chalk'); 2 3var str = chalk.bold.red('foo') + ' bar'; 4console.log('[ANSI]', str) 5console.log('[HTML]', ansiHTML(str));
See complete examples under test
/ examples
directory.
Set Colors
1ansiHTML.setColors({ 2 reset: ['555', '666'], // FOREGROUND-COLOR or [FOREGROUND-COLOR] or [, BACKGROUND-COLOR] or [FOREGROUND-COLOR, BACKGROUND-COLOR] 3 black: 'aaa', // String 4 red: 'bbb', 5 green: 'ccc', 6 yellow: 'ddd', 7 blue: 'eee', 8 magenta: 'fff', 9 cyan: '999', 10 lightgrey: '888', 11 darkgrey: '777' 12});
Reset
1ansiHTML.reset();
Exposed Tags
1var openTags = ansiHTML.tags.open; 2var closeTags = ansiHTML.tags.close;
Test
$ npm install -l
$ npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
Found 1/24 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Reason
10 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
Score
1.7
/10
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More