ansi-regex 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +4 -4
  3. package/readme.md +1 -3
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
  module.exports = function () {
3
- return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g;
3
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
4
4
  };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "ansi-regex",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "Regular expression for matching ANSI escape codes",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/ansi-regex",
7
7
  "author": {
8
8
  "name": "Sindre Sorhus",
9
9
  "email": "sindresorhus@gmail.com",
10
- "url": "http://sindresorhus.com"
10
+ "url": "sindresorhus.com"
11
11
  },
12
12
  "maintainers": [
13
- "Sindre Sorhus <sindresorhus@gmail.com> (http://sindresorhus.com)",
14
- "Joshua Appelman <jappelman@xebia.com> (http://jbnicolai.com)"
13
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
14
+ "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
15
15
  ],
16
16
  "engines": {
17
17
  "node": ">=0.10.0"
package/readme.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Install
7
7
 
8
- ```sh
8
+ ```
9
9
  $ npm install --save ansi-regex
10
10
  ```
11
11
 
@@ -25,8 +25,6 @@ ansiRegex().test('cake');
25
25
  //=> ['\u001b[4m', '\u001b[0m']
26
26
  ```
27
27
 
28
- *It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
29
-
30
28
 
31
29
  ## License
32
30