2.0.14 • Published 3 years ago

isansi v2.0.14

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

isansi

isansi checks whether a string uses ANSI color and style.

Status

CategoryStatus
Versionnpm
DependenciesDavid
Dev dependenciesDavid
BuildGitHub Actions
LicenseGitHub

Installation

$ npm install isansi

Quick start

First you need to add a reference to isansi in your application:

const { isAnsi } = require('isansi');

If you use TypeScript, use the following code instead:

import { isAnsi } from 'isAnsi';

To check a string for a specific color or style, use the appropriate function of the isAnsi object:

const text = chalk.green.bold('foo');

console.log(isAnsi.green(text));  // => true
console.log(isAnsi.bold(text));   // => true

console.log(isAnsi.red(text));    // => false
console.log(isAnsi.italic(text)); // => false

The module supports all colors and styles that are supported by chalk.

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter
2.0.14

3 years ago

2.0.13

4 years ago

2.0.12

4 years ago

2.0.11

4 years ago

2.0.9

4 years ago

2.0.10

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.2

10 years ago