strip-ansi
Advanced tools
Comparing version 5.2.0 to 6.0.0
@@ -6,3 +6,3 @@ /** | ||
``` | ||
import stripAnsi from 'strip-ansi'; | ||
import stripAnsi = require('strip-ansi'); | ||
@@ -16,2 +16,4 @@ stripAnsi('\u001B[4mUnicorn\u001B[0m'); | ||
*/ | ||
export default function stripAnsi(string: string): string; | ||
declare function stripAnsi(string: string): string; | ||
export = stripAnsi; |
'use strict'; | ||
const ansiRegex = require('ansi-regex'); | ||
const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; | ||
module.exports = stripAnsi; | ||
module.exports.default = stripAnsi; | ||
module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; |
{ | ||
"name": "strip-ansi", | ||
"version": "5.2.0", | ||
"version": "6.0.0", | ||
"description": "Strip ANSI escape codes from a string", | ||
@@ -13,6 +13,6 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -48,9 +48,9 @@ "files": [ | ||
"dependencies": { | ||
"ansi-regex": "^4.1.0" | ||
"ansi-regex": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"tsd-check": "^0.5.0", | ||
"xo": "^0.24.0" | ||
"ava": "^2.4.0", | ||
"tsd": "^0.10.0", | ||
"xo": "^0.25.3" | ||
} | ||
} |
@@ -5,16 +5,3 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) | ||
--- | ||
<div align="center"> | ||
<b> | ||
<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> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> | ||
--- | ||
## Install | ||
@@ -40,7 +27,9 @@ | ||
## Security | ||
## strip-ansi for enterprise | ||
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. | ||
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 | ||
@@ -60,5 +49,1 @@ | ||
## License | ||
MIT |
4029
16
47
+ Addedansi-regex@5.0.1(transitive)
- Removedansi-regex@4.1.1(transitive)
Updatedansi-regex@^5.0.0