This commit is contained in:
oitsjustjose 2017-02-26 17:06:42 -05:00
commit 6b60015c02
9588 changed files with 1149251 additions and 49 deletions

View file

@ -0,0 +1,4 @@
'use strict';
module.exports = function () {
return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g;
};

View file

@ -0,0 +1,114 @@
{
"_args": [
[
{
"raw": "ansi-regex@^0.2.0",
"scope": null,
"escapedName": "ansi-regex",
"name": "ansi-regex",
"rawSpec": "^0.2.0",
"spec": ">=0.2.0 <0.3.0",
"type": "range"
},
"/Users/jose/Documents/GitHub/Mods/node_modules/gulp-clone/node_modules/has-ansi"
]
],
"_from": "ansi-regex@>=0.2.0 <0.3.0",
"_id": "ansi-regex@0.2.1",
"_inCache": true,
"_location": "/gulp-clone/ansi-regex",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "1.4.9",
"_phantomChildren": {},
"_requested": {
"raw": "ansi-regex@^0.2.0",
"scope": null,
"escapedName": "ansi-regex",
"name": "ansi-regex",
"rawSpec": "^0.2.0",
"spec": ">=0.2.0 <0.3.0",
"type": "range"
},
"_requiredBy": [
"/gulp-clone/has-ansi",
"/gulp-clone/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
"_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9",
"_shrinkwrap": null,
"_spec": "ansi-regex@^0.2.0",
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/gulp-clone/node_modules/has-ansi",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/ansi-regex/issues"
},
"dependencies": {},
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9",
"tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/ansi-regex",
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"text",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ansi-regex",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/ansi-regex.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.2.1"
}

View file

@ -0,0 +1,33 @@
# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
## Install
```sh
$ npm install --save ansi-regex
```
## Usage
```js
var ansiRegex = require('ansi-regex');
ansiRegex().test('\u001b[4mcake\u001b[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
//=> ['\u001b[4m', '\u001b[0m']
```
*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()`.*
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)