has-ansi
Advanced tools
Comparing version 4.0.0 to 4.0.1
'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) |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3180
4