Socket
Socket
Sign inDemoInstall

has-ansi

Package Overview
Dependencies
1
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

3

index.js
'use strict';
const ansiRegex = require('ansi-regex');
// Removes the `g` flag
const regex = new RegExp(ansiRegex().source);
const regex = ansiRegex({onlyFirst: true});
module.exports = string => regex.test(string);
{
"name": "has-ansi",
"version": "4.0.0",
"version": "4.0.1",
"description": "Check if a string has ANSI escape codes",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

# has-ansi [![Build Status](https://travis-ci.org/chalk/has-ansi.svg?branch=master)](https://travis-ci.org/chalk/has-ansi)
# has-ansi

@@ -3,0 +3,0 @@ > Check if a string has [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc