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 Require Node.js 4 Jun 20, 2017
.gitignore init Jun 14, 2014
.travis.yml
index.js
license
package.json 3.0.0 Jun 20, 2017
readme.md Require Node.js 4 Jun 20, 2017
test.js Require Node.js 4 Jun 20, 2017

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.