Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 4, 2024 via pnpm
Package summary
Share
0
issues
1
license
2
MIT
Package created
7 Dec 2013
Version published
21 Feb 2016
Maintainers
2
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
ansi-regex@2.1.1
strip-ansi@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of strip-ansi 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
ansi-regex2.1.12.29 kBMIT
prod

Visualizations

Frequently Asked Questions

What does strip-ansi do?

Strip-ansi is an essential JavaScript package utilized for removing ANSI escape codes from strings. ANSI escape codes are characters embedded in the text used to control color, cursor position, and other options on video text terminals. Hence, if you want your strings free from these control characters, strip-ansi is your tool of choice.

How do you use strip-ansi?

To use strip-ansi, follow the steps below:

  1. Install the package using Node.js package manager (npm):
$ npm install strip-ansi
  1. Import and apply it to your strings in JavaScript as shown:
import stripAnsi from 'strip-ansi';

// Apply strip-ansi
let plainText = stripAnsi('\u001B[4mUnicorn\u001B[0m');
console.log(plainText); // Output: 'Unicorn'

let websiteLink = stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
console.log(websiteLink); // Output: 'Click'

The stripAnsi() function is used to transform ANSI escape codes in strings into readable text/strings.

Where are the strip-ansi docs?

The documentation for strip-ansi is not separately maintained but can be found in the README file within the project's GitHub repository. Additional information and examples may also be available within the repository itself: git+https://github.com/chalk/strip-ansi.git. As a community-driven project, updates and changes are potentially frequent, and the repository often serves as the best and most current resource for developers.