strip-ansi 5.2.0 → 6.0.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.
- package/index.d.ts +4 -2
- package/index.js +1 -4
- package/package.json +7 -7
- package/readme.md +4 -19
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a
|
|
|
3
3
|
|
|
4
4
|
@example
|
|
5
5
|
```
|
|
6
|
-
import stripAnsi
|
|
6
|
+
import stripAnsi = require('strip-ansi');
|
|
7
7
|
|
|
8
8
|
stripAnsi('\u001B[4mUnicorn\u001B[0m');
|
|
9
9
|
//=> 'Unicorn'
|
|
@@ -12,4 +12,6 @@ stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
|
|
12
12
|
//=> 'Click'
|
|
13
13
|
```
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
declare function stripAnsi(string: string): string;
|
|
16
|
+
|
|
17
|
+
export = stripAnsi;
|
package/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const ansiRegex = require('ansi-regex');
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
module.exports = stripAnsi;
|
|
7
|
-
module.exports.default = stripAnsi;
|
|
4
|
+
module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strip-ansi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Strip ANSI escape codes from a string",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "chalk/strip-ansi",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"url": "sindresorhus.com"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": ">=8"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "xo && ava && tsd
|
|
16
|
+
"test": "xo && ava && tsd"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"text"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"ansi-regex": "^
|
|
47
|
+
"ansi-regex": "^5.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"ava": "^
|
|
51
|
-
"tsd
|
|
52
|
-
"xo": "^0.
|
|
50
|
+
"ava": "^2.4.0",
|
|
51
|
+
"tsd": "^0.10.0",
|
|
52
|
+
"xo": "^0.25.3"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/readme.md
CHANGED
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
|
|
4
4
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<div align="center">
|
|
8
|
-
<b>
|
|
9
|
-
<a href="https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for 'strip-ansi' with a Tidelift subscription</a>
|
|
10
|
-
</b>
|
|
11
|
-
<br>
|
|
12
|
-
<sub>
|
|
13
|
-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
14
|
-
</sub>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
5
|
|
|
19
6
|
## Install
|
|
20
7
|
|
|
@@ -36,9 +23,11 @@ stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
|
|
36
23
|
```
|
|
37
24
|
|
|
38
25
|
|
|
39
|
-
##
|
|
26
|
+
## strip-ansi for enterprise
|
|
27
|
+
|
|
28
|
+
Available as part of the Tidelift Subscription.
|
|
40
29
|
|
|
41
|
-
|
|
30
|
+
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)
|
|
42
31
|
|
|
43
32
|
|
|
44
33
|
## Related
|
|
@@ -55,7 +44,3 @@ To report a security vulnerability, please use the [Tidelift security contact](h
|
|
|
55
44
|
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
56
45
|
- [Josh Junon](https://github.com/qix-)
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
## License
|
|
60
|
-
|
|
61
|
-
MIT
|