Socket
Socket
Sign inDemoInstall

strip-ansi

Package Overview
Dependencies
1
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 4.0.0

6

index.js
'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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc