Socket
Socket
Sign inDemoInstall

ansi-regex

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-regex - npm Package Compare versions

Comparing version 6.0.1 to 6.1.0

4

index.d.ts

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

export interface Options {
export type Options = {
/**

@@ -8,3 +8,3 @@ Match only the first ANSI escape.

readonly onlyFirst: boolean;
}
};

@@ -11,0 +11,0 @@ /**

export default function ansiRegex({onlyFirst = false} = {}) {
// Valid string terminator sequences are BEL, ESC\, and 0x9c
const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
].join('|');

@@ -6,0 +8,0 @@

{
"name": "ansi-regex",
"version": "6.0.1",
"version": "6.1.0",
"description": "Regular expression for matching ANSI escape codes",

@@ -15,2 +15,4 @@ "license": "MIT",

"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {

@@ -55,6 +57,7 @@ "node": ">=12"

"devDependencies": {
"ansi-escapes": "^5.0.0",
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
"tsd": "^0.21.0",
"xo": "^0.54.2"
}
}

@@ -7,5 +7,5 @@ # ansi-regex

```sh
npm install ansi-regex
```
$ npm install ansi-regex
```

@@ -62,13 +62,1 @@ ## Usage

- [Josh Junon](https://github.com/qix-)
---
<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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc