Socket
Socket
Sign inDemoInstall

has-ansi

Package Overview
Dependencies
1
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 2.0.0

23

package.json
{
"name": "has-ansi",
"version": "1.0.3",
"version": "2.0.0",
"description": "Check if a string has ANSI escape codes",

@@ -10,11 +10,8 @@ "license": "MIT",

"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
"url": "sindresorhus.com"
},
"maintainers": [
"Sindre Sorhus <sindresorhus@gmail.com> (http://sindresorhus.com)",
"Joshua Appelman <jappelman@xebia.com> (http://jbnicolai.com)"
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
],
"bin": {
"has-ansi": "cli.js"
},
"engines": {

@@ -24,11 +21,8 @@ "node": ">=0.10.0"

"scripts": {
"test": "mocha"
"test": "node test.js"
},
"files": [
"index.js",
"cli.js"
"index.js"
],
"keywords": [
"cli",
"bin",
"ansi",

@@ -58,8 +52,7 @@ "styles",

"dependencies": {
"ansi-regex": "^1.1.0",
"get-stdin": "^4.0.1"
"ansi-regex": "^2.0.0"
},
"devDependencies": {
"mocha": "*"
"ava": "0.0.4"
}
}

@@ -8,3 +8,3 @@ # has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi)

```sh
```
$ npm install --save has-ansi

@@ -27,21 +27,12 @@ ```

## CLI
## Related
```sh
$ npm install --global has-ansi
```
- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module
- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes
- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes
- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right
```
$ has-ansi --help
Usage
has-ansi <string>
echo <string> | has-ansi
Exits with code 0 if input has ANSI escape codes and 1 if not
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)
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