Installations
npm install strip-ansi
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=12
Node Version
16.20.0
NPM Version
9.2.0
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (89.8%)
TypeScript (10.2%)
Developer
chalk
Download Statistics
Total Downloads
33,030,692,789
Last Day
36,045,314
Last Week
165,378,685
Last Month
748,791,536
Last Year
9,021,654,276
GitHub Statistics
406 Stars
70 Commits
38 Forks
12 Watching
2 Branches
10 Contributors
Bundle Size
637.00 B
Minified
422.00 B
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
7.1.0
Package Id
strip-ansi@7.1.0
Unpacked Size
4.22 kB
Size
2.12 kB
File Count
5
NPM Version
9.2.0
Node Version
16.20.0
Publised On
28 May 2023
Total Downloads
Cumulative downloads
Total Downloads
33,030,692,789
Last day
-3.8%
36,045,314
Compared to previous day
Last week
-15.4%
165,378,685
Compared to previous week
Last month
5.4%
748,791,536
Compared to previous month
Last year
25.5%
9,021,654,276
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
strip-ansi
Strip ANSI escape codes from a string
Install
$ npm install strip-ansi
Usage
1import stripAnsi from 'strip-ansi';
2
3stripAnsi('\u001B[4mUnicorn\u001B[0m');
4//=> 'Unicorn'
5
6stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
7//=> 'Click'
strip-ansi for enterprise
Available as part of the Tidelift Subscription.
The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Related
- strip-ansi-cli - CLI for this module
- strip-ansi-stream - Streaming version of this module
- has-ansi - Check if a string has ANSI escape codes
- ansi-regex - Regular expression for matching ANSI escape codes
- chalk - Terminal string styling done right
Maintainers
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: .github/security.md:1
- Info: Found linked content: .github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/security.md:1
- Info: Found text in security policy: .github/security.md:1
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
Found 6/30 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/chalk/strip-ansi/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/chalk/strip-ansi/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:20
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
- Warn: branch protection not enabled for branch '6.0.1'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Score
4.4
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to strip-ansi
strip-color
Strip ANSI color codes from a string. No dependencies.
@types/strip-ansi
Stub TypeScript definitions entry for strip-ansi, which provides its own types definitions
strip-ansi-control-characters
Strips ANSI Control Characters from string or stream
strip-ansi-stream
Strip ANSI escape codes