Back to Explore

chalk/strip-ansi

GitHub
1 watchersOpen source

Last release: 3 months ago

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, with a recent upstream push and a new version published (v7.2.0 on 2026-02-26).
  • Update cadence appears irregular but ongoing, roughly 5.5 months between v7.1.2 (2025-09-08) and v7.2.0 (2026-02-26), and a much longer gap back to v7.1.0 (2023-05-28).

AI summary generated Today

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

Recent updates

  • v7.2.0

    3 months ago

    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

    9 months ago

    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

    5/28/2023

    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

    9/23/2021

    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

    9/11/2021

    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

    4/16/2021

    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

    11/9/2019

    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

    3/18/2019

    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

    3/8/2019

    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