has-ansi
Advanced tools
Weekly downloads
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
FAQs
Check if a string has ANSI escape codes
The npm package has-ansi receives a total of 11,631,886 weekly downloads. As such, has-ansi popularity was classified as popular.
We found that has-ansi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.