ansi-regex 0.1.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 +2 -0
  2. package/package.json +47 -0
  3. package/readme.md +28 -0
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = /\x1B\[([0-9]{1,3}(;[0-9]{1,3})*)?[m|K]/g;
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "ansi-regex",
3
+ "version": "0.1.0",
4
+ "description": "Regular expression for matching ANSI escape codes",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/ansi-regex",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "http://sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=0.10.0"
14
+ },
15
+ "scripts": {
16
+ "test": "mocha"
17
+ },
18
+ "files": [
19
+ "index.js"
20
+ ],
21
+ "keywords": [
22
+ "ansi",
23
+ "styles",
24
+ "color",
25
+ "colour",
26
+ "colors",
27
+ "terminal",
28
+ "console",
29
+ "cli",
30
+ "string",
31
+ "tty",
32
+ "escape",
33
+ "formatting",
34
+ "rgb",
35
+ "256",
36
+ "shell",
37
+ "xterm",
38
+ "command-line",
39
+ "text",
40
+ "regex",
41
+ "regexp",
42
+ "re"
43
+ ],
44
+ "devDependencies": {
45
+ "mocha": "*"
46
+ }
47
+ }
package/readme.md ADDED
@@ -0,0 +1,28 @@
1
+ # ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
2
+
3
+ > Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ $ npm install --save ansi-regex
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ var ansiRegex = require('ansi-regex');
17
+
18
+ ansiRegex.test('\x1b[4mcake\x1b[0m');
19
+ //=> true
20
+
21
+ ansiRegex.test('cake');
22
+ //=> false
23
+ ```
24
+
25
+
26
+ ## License
27
+
28
+ MIT © [Sindre Sorhus](http://sindresorhus.com)