npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

has-ansi-cli

4.1.1

@sindresorhus

npmHomeRepoSnykSocket
Downloads:279
$ npm install has-ansi-cli
DailyWeeklyMonthlyYearly

has-ansi-cli

Check if a string has ANSI escape codes

Install

$ npm install --global has-ansi-cli

Usage

$ has-ansi --help

  Usage
    $ has-ansi <text>
    $ echo <text> | has-ansi

  Example
    $ ls --color | has-ansi && echo 'has ansi'

  Exits with code 0 if input has ANSI escape codes and 1 if not

Related

  • has-ansi - API for this module

Maintainers

  • Sindre Sorhus
  • Josh Junon