npm.io
6.0.2 • Published 11 months ago

has-ansi

Licence
MIT
Version
6.0.2
Deps
1
Size
3 kB
Vulns
0
Weekly
0

has-ansi

Check if a string has ANSI escape codes

Install

npm install has-ansi

Usage

import hasAnsi from 'has-ansi';

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

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

Keywords