Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 3.2.2 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)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc