strip-ansi
Advanced tools
Comparing version 3.0.1 to 4.0.0
'use strict'; | ||
var ansiRegex = require('ansi-regex')(); | ||
const ansiRegex = require('ansi-regex'); | ||
module.exports = function (str) { | ||
return typeof str === 'string' ? str.replace(ansiRegex, '') : str; | ||
}; | ||
module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; |
{ | ||
"name": "strip-ansi", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "Strip ANSI escape codes", | ||
@@ -12,9 +12,4 @@ "license": "MIT", | ||
}, | ||
"maintainers": [ | ||
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)", | ||
"Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)", | ||
"JD Ballard <i.am.qix@gmail.com> (github.com/qix-)" | ||
], | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4" | ||
}, | ||
@@ -52,3 +47,3 @@ "scripts": { | ||
"dependencies": { | ||
"ansi-regex": "^2.0.0" | ||
"ansi-regex": "^3.0.0" | ||
}, | ||
@@ -55,0 +50,0 @@ "devDependencies": { |
# 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) | ||
> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) | ||
@@ -9,3 +9,3 @@ | ||
``` | ||
$ npm install --save strip-ansi | ||
$ npm install strip-ansi | ||
``` | ||
@@ -17,6 +17,6 @@ | ||
```js | ||
var stripAnsi = require('strip-ansi'); | ||
const stripAnsi = require('strip-ansi'); | ||
stripAnsi('\u001b[4mcake\u001b[0m'); | ||
//=> 'cake' | ||
stripAnsi('\u001B[4mUnicorn\u001B[0m'); | ||
//=> 'Unicorn' | ||
``` | ||
@@ -33,4 +33,10 @@ | ||
## Maintainers | ||
- [Sindre Sorhus](https://github.com/sindresorhus) | ||
- [Josh Junon](https://github.com/qix-) | ||
## License | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
40
1
2938
3
+ Addedansi-regex@3.0.1(transitive)
- Removedansi-regex@2.1.1(transitive)
Updatedansi-regex@^3.0.0