has-ansi
Check if a string has ANSI escape codes
Last updated 10 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install has-ansi 
SYNC missed versions from official npm registry.

has-ansi Build Status

Check if a string has ANSI escape codes

Install

$ npm install has-ansi

Usage

const hasAnsi = require('has-ansi');

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

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

Related

Maintainers


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Current Tags

  • 2.0.0                                ...           latest (10 years ago)

3 Versions

  • 1.0.3                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
  • 2.0.0                                ...           10 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org