strip-indent is a JavaScript utility for removing redundant indentation by stripping leading whitespace from each line in a string. It determines how much to remove based on the line with the least leading whitespace (ignoring empty lines), and it also offers a dedent function that removes surrounding blank lines.
Project status
- Actively maintained, recent changes include v4.1.1 on 2025-10-12, with prior updates in 2025-09-11 (v4.1.0), indicating ongoing work rather than maintenance mode.
- Apparent update cadence is roughly monthly across the most recent cycle (v4.1.1 about a month after v4.1.0), though earlier history shows a much longer gap before that (v4.0.0 in 2021).
AI summary generated Today
Recent updates
v4.1.1
7 months agoRelease v4.1.1 makes a small API surface adjustment related to the module default export. The only code diff change affecting developers is in the TypeScript declaration file, plus a package version bump.
Breakingv4.1.0
9 months agov4.1.0 introduces a new named export, `dedent`, intended for cleaning up template literals by stripping indentation and removing surrounding whitespace-only blank lines. The codebase also changes the underlying implementation of `stripIndent`, updates documentation and tests, and modifies the repo tooling/dependencies.
Featuresv4.0.0
5/3/2021v4.0.0 is a major release focused on moving the package to pure ESM and raising the supported Node.js version. The implementation and TypeScript typings were updated to use a default export, and package metadata was adjusted accordingly.
Breakingv3.0.0
4/17/2019v3.0.0 introduces a TypeScript definition and raises the minimum supported Node.js version. The release includes a breaking change requiring Node.js 8, so existing users on older Node versions will need to upgrade their runtime.
BreakingFeatures