has-ansi
Advanced tools
Check if a string has ANSI escape codes
Weekly downloads
Changelog
https://github.com/chalk/has-ansi/compare/v5.0.0...v5.0.1
Readme
Check if a string has ANSI escape codes
$ npm install has-ansi
import hasAnsi from 'has-ansi';
hasAnsi('\u001B[4mUnicorn\u001B[0m');
//=> true
hasAnsi('cake');
//=> false
Check if a string has ANSI escape codes
The npm package has-ansi receives a total of 13,182,811 weekly downloads. As such, has-ansi popularity was classified as popular.
We found that has-ansi demonstrated a healthy version release cadence and project activity. It has 2 open source maintainers collaborating on the project.