Gathering detailed insights and metrics for ansi-styles-template
Gathering detailed insights and metrics for ansi-styles-template
Gathering detailed insights and metrics for ansi-styles-template
Gathering detailed insights and metrics for ansi-styles-template
npm install ansi-styles-template
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
7 Commits
3 Watching
2 Branches
1 Contributors
Updated on 28 Dec 2017
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
80.6%
121
Compared to previous day
Last week
27.6%
467
Compared to previous week
Last month
87.2%
1,303
Compared to previous month
Last year
-68%
5,275
Compared to previous year
1
1
Use ANSI styles in template notation
1npm install ansi-styles-template
1const {template} = require('ansi-styles-template'); 2 3const str = '{red}Bloody..{/red}'; 4 5console.log(template(str)); // -> "\u001b[31mBloody..\u001b[39m"
The styles available as tags conform to ansy-styles.
Or dump replacementMap
in the following way, you can confirm more certainly.
1const {replacementMap} = require('ansi-styles-template'); 2 3console.log(replacementMap); 4// -> 5// Map { 6// 'reset' => { opener: '\u001b[0m', closer: '\u001b[0m' }, 7// 'bold' => { opener: '\u001b[1m', closer: '\u001b[22m' }, 8// 'dim' => { opener: '\u001b[2m', closer: '\u001b[22m' }, 9// 'italic' => { opener: '\u001b[3m', closer: '\u001b[23m' }, 10// 'underline' => { opener: '\u001b[4m', closer: '\u001b[24m' }, 11// 'inverse' => { opener: '\u001b[7m', closer: '\u001b[27m' }, 12// 'hidden' => { opener: '\u001b[8m', closer: '\u001b[28m' }, 13// 'strikethrough' => { opener: '\u001b[9m', closer: '\u001b[29m' }, 14// 'black' => { opener: '\u001b[30m', closer: '\u001b[39m' }, 15// 'red' => { opener: '\u001b[31m', closer: '\u001b[39m' }, 16// 'green' => { opener: '\u001b[32m', closer: '\u001b[39m' }, 17// 'yellow' => { opener: '\u001b[33m', closer: '\u001b[39m' }, 18// 'blue' => { opener: '\u001b[34m', closer: '\u001b[39m' }, 19// 'magenta' => { opener: '\u001b[35m', closer: '\u001b[39m' }, 20// 'cyan' => { opener: '\u001b[36m', closer: '\u001b[39m' }, 21// 'white' => { opener: '\u001b[37m', closer: '\u001b[39m' }, 22// 'gray' => { opener: '\u001b[90m', closer: '\u001b[39m' }, 23// 'redBright' => { opener: '\u001b[91m', closer: '\u001b[39m' }, 24// 'greenBright' => { opener: '\u001b[92m', closer: '\u001b[39m' }, 25// 'yellowBright' => { opener: '\u001b[93m', closer: '\u001b[39m' }, 26// 'blueBright' => { opener: '\u001b[94m', closer: '\u001b[39m' }, 27// 'magentaBright' => { opener: '\u001b[95m', closer: '\u001b[39m' }, 28// 'cyanBright' => { opener: '\u001b[96m', closer: '\u001b[39m' }, 29// 'whiteBright' => { opener: '\u001b[97m', closer: '\u001b[39m' }, 30// 'bgBlack' => { opener: '\u001b[40m', closer: '\u001b[49m' }, 31// 'bgRed' => { opener: '\u001b[41m', closer: '\u001b[49m' }, 32// 'bgGreen' => { opener: '\u001b[42m', closer: '\u001b[49m' }, 33// 'bgYellow' => { opener: '\u001b[43m', closer: '\u001b[49m' }, 34// 'bgBlue' => { opener: '\u001b[44m', closer: '\u001b[49m' }, 35// 'bgMagenta' => { opener: '\u001b[45m', closer: '\u001b[49m' }, 36// 'bgCyan' => { opener: '\u001b[46m', closer: '\u001b[49m' }, 37// 'bgWhite' => { opener: '\u001b[47m', closer: '\u001b[49m' }, 38// 'bgBlackBright' => { opener: '\u001b[100m', closer: '\u001b[49m' }, 39// 'bgRedBright' => { opener: '\u001b[101m', closer: '\u001b[49m' }, 40// 'bgGreenBright' => { opener: '\u001b[102m', closer: '\u001b[49m' }, 41// 'bgYellowBright' => { opener: '\u001b[103m', closer: '\u001b[49m' }, 42// 'bgBlueBright' => { opener: '\u001b[104m', closer: '\u001b[49m' }, 43// 'bgMagentaBright' => { opener: '\u001b[105m', closer: '\u001b[49m' }, 44// 'bgCyanBright' => { opener: '\u001b[106m', closer: '\u001b[49m' }, 45// 'bgWhiteBright' => { opener: '\u001b[107m', closer: '\u001b[49m' } }
str: string
options.leftBrace: string
"{"
options.rightBrace: string
"}"
options.strict: boolean
false
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/7 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 SAST tool detected
Details
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 2024-11-18
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