Skip to content
Check if a string has ANSI escape codes
Branch: master
Clone or download
Latest commit 5b1f1e1 Jun 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js Require Node.js 4 Jun 20, 2017
license
package.json 3.0.0 Jun 20, 2017
readme.md
test.js

readme.md

has-ansi Build Status

Check if a string has ANSI escape codes

Install

$ npm install has-ansi

Usage

const hasAnsi = require('has-ansi');

hasAnsi('\u001B[4mUnicorn\u001B[0m');
//=> true

hasAnsi('cake');
//=> false

Related

Maintainers

License

MIT

You can’t perform that action at this time.