summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/string-width/node_modules/strip-ansi
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/string-width/node_modules/strip-ansi')
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/index.d.ts17
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js2
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json102
-rw-r--r--deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md17
4 files changed, 82 insertions, 56 deletions
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.d.ts b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000000..907fccc292
--- /dev/null
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.d.ts
@@ -0,0 +1,17 @@
+/**
+Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
+
+@example
+```
+import stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+*/
+declare function stripAnsi(string: string): string;
+
+export = stripAnsi;
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js
index 96e0292c8e..9a593dfcd1 100644
--- a/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js
@@ -1,4 +1,4 @@
'use strict';
const ansiRegex = require('ansi-regex');
-module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
+module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json
index 555f194616..1a41108d42 100644
--- a/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json
@@ -1,52 +1,54 @@
{
- "name": "strip-ansi",
- "version": "4.0.0",
- "description": "Strip ANSI escape codes",
- "license": "MIT",
- "repository": "chalk/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "dependencies": {
- "ansi-regex": "^3.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
+ "name": "strip-ansi",
+ "version": "6.0.1",
+ "description": "Strip ANSI escape codes from a string",
+ "license": "MIT",
+ "repository": "chalk/strip-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "tsd": "^0.10.0",
+ "xo": "^0.25.3"
+ }
}
diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md
index dc76f0cb1a..7c4b56d46d 100644
--- a/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/readme.md
@@ -1,6 +1,6 @@
# 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](https://en.wikipedia.org/wiki/ANSI_escape_code)
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
## Install
@@ -17,12 +17,23 @@ const stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
```
+## strip-ansi for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+
## Related
- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of 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
@@ -33,7 +44,3 @@ stripAnsi('\u001B[4mUnicorn\u001B[0m');
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
-
-## License
-
-MIT