From 802cbbfdcb31a6980d46f916f1d44089d8a6da70 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 26 Jun 2017 16:15:24 -0700 Subject: strip-ansi@4.0.0 --- .../gauge/node_modules/strip-ansi/index.js | 6 ++ .../gauge/node_modules/strip-ansi/license | 21 ++++ .../strip-ansi/node_modules/ansi-regex/index.js | 4 + .../strip-ansi/node_modules/ansi-regex/license | 21 ++++ .../node_modules/ansi-regex/package.json | 108 +++++++++++++++++++++ .../strip-ansi/node_modules/ansi-regex/readme.md | 39 ++++++++ .../gauge/node_modules/strip-ansi/package.json | 102 +++++++++++++++++++ .../gauge/node_modules/strip-ansi/readme.md | 33 +++++++ 8 files changed, 334 insertions(+) create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/license create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/license create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/package.json create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/package.json create mode 100644 node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md (limited to 'node_modules/npmlog') diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js new file mode 100644 index 000000000..099480fbf --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/license b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 000000000..b9574ed7e --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/license b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 000000000..b98332e57 --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,108 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/npmlog/gauge/strip-ansi/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/npmlog/gauge/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "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": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 000000000..6a928edf0 --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const 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'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/package.json b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/package.json new file mode 100644 index 000000000..153e8df65 --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/package.json @@ -0,0 +1,102 @@ +{ + "_from": "strip-ansi@^3.0.1", + "_id": "strip-ansi@3.0.1", + "_inBundle": false, + "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "_location": "/npmlog/gauge/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^3.0.1", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/npmlog/gauge", + "/npmlog/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "_spec": "strip-ansi@^3.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.1" +} diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md new file mode 100644 index 000000000..cb7d9ff7e --- /dev/null +++ b/node_modules/npmlog/node_modules/gauge/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) -- cgit v1.2.3