Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

has-ansi

Package Overview
Dependencies
1
Maintainers
2
Versions
11
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

has-ansi

Check if a string has ANSI escape codes

    5.0.1latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
12,217,085
decreased by-2.33%

Weekly downloads

Readme

Source

has-ansi

Check if a string has ANSI escape codes

Install

$ npm install has-ansi

Usage

import hasAnsi from 'has-ansi';

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

hasAnsi('cake');
//=> false
  • has-ansi-cli - CLI for this module
  • strip-ansi - Strip ANSI escape codes
  • ansi-regex - Regular expression for matching ANSI escape codes
  • chalk - Terminal string styling done right

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.

Keywords

FAQs

Last updated on 13 Sep 2021

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc