ansi-colors
Advanced tools
+10
-2
@@ -100,4 +100,12 @@ 'use strict'; | ||
| const re = colors.ansiRegex = /\u001b\[\d+m/gm; | ||
| colors.hasColor = colors.hasAnsi = str => !!str && typeof str === 'string' && re.test(str); | ||
| colors.unstyle = str => typeof str === 'string' ? str.replace(re, '') : str; | ||
| colors.hasColor = colors.hasAnsi = str => { | ||
| re.lastIndex = 0; | ||
| return !!str && typeof str === 'string' && re.test(str); | ||
| }; | ||
| colors.unstyle = str => { | ||
| re.lastIndex = 0; | ||
| return typeof str === 'string' ? str.replace(re, '') : str; | ||
| }; | ||
| colors.none = colors.clear = colors.noop = str => str; // no-op, for programmatic usage | ||
@@ -104,0 +112,0 @@ colors.stripColor = colors.unstyle; |
+1
-1
| { | ||
| "name": "ansi-colors", | ||
| "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", | ||
| "version": "3.2.2", | ||
| "version": "3.2.3", | ||
| "homepage": "https://github.com/doowb/ansi-colors", | ||
@@ -6,0 +6,0 @@ "author": "Brian Woodward (https://github.com/doowb)", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
20804
0.34%282
2.17%