Gathering detailed insights and metrics for ansistyles
Gathering detailed insights and metrics for ansistyles
Functions that surround a string with ansistyle codes.
npm install ansistyles
Typescript
Module System
NPM Version
100
Supply Chain
86.8
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
152,388,972
Last Day
42,841
Last Week
200,571
Last Month
928,689
Last Year
14,990,762
10 Stars
16 Commits
1 Forks
4 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.1.3
Package Id
ansistyles@0.1.3
Size
2.57 kB
NPM Version
1.3.11
Publised On
03 Dec 2013
Cumulative downloads
Total Downloads
Last day
-6.5%
42,841
Compared to previous day
Last week
-16.1%
200,571
Compared to previous week
Last month
0.2%
928,689
Compared to previous month
Last year
-34.8%
14,990,762
Compared to previous year
No dependencies detected.
Functions that surround a string with ansistyle codes so it prints in style.
npm install ansistyles
1var styles = require('ansistyles'); 2 3console.log(styles.bright('hello world')); // prints hello world in 'bright' white 4console.log(styles.underline('hello world')); // prints hello world underlined 5console.log(styles.inverse('hello world')); // prints hello world black on white
Get the ansicolors module:
npm install ansicolors
1var styles = require('ansistyles') 2 , colors = require('ansicolors'); 3 4 console.log( 5 // prints hello world underlined in blue on a green background 6 colors.bgGreen(colors.blue(styles.underline('hello world'))) 7 );
Look at the tests to see more examples and/or run them via:
npm explore ansistyles && npm test
As you can see from here, more styles are available, but didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.
I included them for completeness, but didn't show them in the examples because they seem to have no effect.
ansistyles tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, I'd suggest to look at the features of the ansi module.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
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
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-27
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