{ "name": "ansi-regex", "version": "1.1.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/sindresorhus/ansi-regex" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "maintainers": [ { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, { "name": "Joshua Appelman", "email": "jappelman@xebia.com", "url": "http://jbnicolai.com" } ], "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha test/test.js", "view-supported": "node test/viewCodes.js" }, "files": [ "index.js" ], "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" ], "devDependencies": { "mocha": "*" }, "readme": "# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)\n\n> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```sh\n$ npm install --save ansi-regex\n```\n\n\n## Usage\n\n```js\nvar ansiRegex = require('ansi-regex');\n\nansiRegex().test('\\u001b[4mcake\\u001b[0m');\n//=> true\n\nansiRegex().test('cake');\n//=> false\n\n'\\u001b[4mcake\\u001b[0m'.match(ansiRegex());\n//=> ['\\u001b[4m', '\\u001b[0m']\n```\n\n*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()`.*\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/sindresorhus/ansi-regex/issues" }, "homepage": "https://github.com/sindresorhus/ansi-regex", "_id": "ansi-regex@1.1.1", "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", "_from": "ansi-regex@^1.0.0", "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz" }