Gathering detailed insights and metrics for ansistyles
Gathering detailed insights and metrics for ansistyles
Gathering detailed insights and metrics for ansistyles
Gathering detailed insights and metrics for ansistyles
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
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Stars
16 Commits
1 Forks
3 Watchers
1 Branches
1 Contributors
Updated on May 21, 2020
Latest Version
0.1.3
Package Id
ansistyles@0.1.3
Size
2.57 kB
NPM Version
1.3.11
Published on
Dec 03, 2013
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
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
0 existing vulnerabilities detected
Reason
license file detected
Details
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-07-07
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