Back to Explore

chalk/strip-ansi

GitHub
1 watchersOpen source

Last release:

strip-ansi is a Node.js utility that removes ANSI escape codes from a string, useful for cleaning up terminal-colored output so it displays as plain text. The README notes it provides consistent behavior across Node.js versions and that Node.js includes a built-in equivalent (`stripVTControlCharacters`) based on this package.

Project status

  • Actively maintained: The GitHub upstream shows a recent push on 2026-02-26, with subsequent published updates (for example v7.2.0 on 2026-02-26), indicating the project is currently maintained.
  • Updates cadence: There is a ~5-month gap between v7.1.2 (2025-09-08) and v7.2.0 (2026-02-26), but much longer gaps before that (for example, v7.1.0 in 2023). Overall, cadence appears sporadic but active recently.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v7.2.0

    v7.2.0 adds a performance optimization to return the input string early when no ANSI introducer bytes are present. The code diff also shows a runtime dependency bump for ansi-regex and updates to CI and development tooling, but the release notes only mention the fast path.

    Features
  • v7.1.2

    v7.1.2 primarily updates CI workflow action versions and tweaks package metadata (TypeScript types entry and sideEffects flag). The release notes only mention a security fix for 7.1.1, but the provided diff shows no corresponding security-related code changes.

    Security
  • v7.1.0

    v7.1.0 primarily claims a performance improvement. The code changes, however, also introduce multiple breaking behavior changes, especially around module system (CommonJS to ESM), export shape, Node support, and runtime input validation.

    Breaking
  • v6.0.1

    Release v6.0.1 is a small backport release that updates the strip-ansi package to use a newer version of its `ansi-regex` dependency. The provided release notes document the dependency upgrade, and the code diff shows no other source changes.

  • v7.0.1

    v7.0.1 is a dependency-only update for strip-ansi. The release notes are minimal and only state that dependencies were upgraded.

  • v7.0.0

    v7.0.0 converts strip-ansi to a pure ESM package and bumps the minimum supported Node.js version to 12. The code diff also introduces additional behavioral and packaging changes beyond what the release notes explicitly mention.

    Breaking
  • v6.0.0

    v6.0.0 updates strip-ansi to require Node.js >= 8 and changes the package’s TypeScript export shape. The runtime implementation also changes the CommonJS export interop, and the dependency on ansi-regex is bumped.

    Breaking
  • v5.2.0

    v5.2.0 adds TypeScript typing support for strip-ansi and updates the project to validate the types during CI via tsd-check. It also adjusts the module export shape in index.js to expose a default export property and updates the README and test tooling.

    Features
  • v5.1.0

    v5.1.0 adds support for terminal link escape codes, expanding which ANSI-like sequences the library will strip. This is a functionality enhancement that should improve compatibility with terminal outputs that include clickable link metadata.

    Features
  • v5.0.0

    Release v5.0.0 was published on 2018-09-29, but no release notes were provided by the publisher. As a result, there is no documented information here about new features, bug fixes, breaking changes, security updates, or migration steps.