🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ansi-colors

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-colors - npm Package Compare versions

Comparing version

to
3.2.3

12

index.js

@@ -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;

2

package.json
{
"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)",