Skip to content
Check if a string has ANSI escape codes
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig Require Node.js 4 Jun 20, 2017
.gitattributes Require Node.js 4 Jun 20, 2017
.gitignore init Jun 14, 2014
.travis.yml Require Node.js 4 Jun 20, 2017
index.js Require Node.js 4 Jun 20, 2017
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.