You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

ansi-regex

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 5.0.0

index.d.ts

8

index.js
'use strict';
module.exports = options => {
options = Object.assign({
onlyFirst: false
}, options);
module.exports = ({onlyFirst = false} = {}) => {
const pattern = [

@@ -13,3 +9,3 @@ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',

return new RegExp(pattern, options.onlyFirst ? undefined : 'g');
return new RegExp(pattern, onlyFirst ? undefined : 'g');
};
{
"name": "ansi-regex",
"version": "4.1.0",
"version": "5.0.0",
"description": "Regular expression for matching ANSI escape codes",

@@ -13,10 +13,11 @@ "license": "MIT",

"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava",
"test": "xo && ava && tsd",
"view-supported": "node fixtures/view-codes.js"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],

@@ -51,5 +52,6 @@ "keywords": [

"devDependencies": {
"ava": "^0.25.0",
"xo": "^0.23.0"
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
}
}

@@ -5,17 +5,3 @@ # ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)

---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
---
## Install

@@ -52,3 +38,3 @@

### ansiRegex([options])
### ansiRegex(options?)

@@ -59,2 +45,4 @@ Returns a regex for matching ANSI escape codes.

Type: `object`
##### onlyFirst

@@ -77,7 +65,2 @@

## Security
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
## Maintainers

@@ -89,4 +72,12 @@

## License
---
MIT
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc