has-ansi / 2.0.0 last updated 4 months ago created on Jun 14th 2014

Install

npm install --save has-ansi

Clone

git clone git@github.com:sindresorhus/has-ansi.git

dependencies

main ansi-regex 2.0.0 MIT

maintainers

qix qix
sindresorhus sindresorhus

versions 6 total

2.0.0 a year ago sindresorhus
1.0.3 a year ago jbnicolai
1.0.2 a year ago sindresorhus
1.0.1 2 years ago jbnicolai
1.0.0 2 years ago sindresorhus
0.1.0 2 years ago sindresorhus
187365 Downloads yesterday.

readme

has-ansi Build Status

Check if a string has ANSI escape codes

Install

$ npm install --save has-ansi

Usage

1
2
3
4
5
6
7
var hasAnsi = require('has-ansi');

hasAnsi('\u001b[4mcake\u001b[0m');
//=> true

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

Related

License

MIT © Sindre Sorhus

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.