Awesome
is-ansi
Check that given string contain ANSI color codes, without CLI
Install
npm i is-ansi --save
npm test
Usage
For more use-cases see the tests
var isAnsi = require('is-ansi')
isAnsi('\u001b[4mCharlike\u001b[0m')
//=> true
isAnsi('Charlike')
//=> false
Related
- has-ansi: Check if a string has ANSI escape codes
- has-value: Returns true if a value exists, false if empty. Works… more
- is-match: Create a matching function from a glob pattern, regex, string,… more
- is-missing: Check that given
name
oruser/repo
exists in npm registry… more - is-installed: Checks that given package is installed on the system -… more
- is-es6-generators: Check whether a value is a
Generator
orGeneratorFunction
. The… more - micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster… more
- verb: Documentation generator for GitHub projects. Extremely powerful, easy to use,… more
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.