has-ansi
Check if a string has ANSI escape codes
Last updated 9 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ 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

  • 4.0.0                                ...           latest (9 months ago)

8 Versions

  • 4.0.0                                ...           9 months ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 8,264
This Week 193,583
This Month 773,790
Last Day 13,562
Last Week 189,578
Last Month 836,471
Dependencies (1)
Dev Dependencies (2)
Dependents (180)

Copyright 2014 - 2016 © taobao.org |