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
- This GitHub source appears actively maintained, with updates as recently as 2025-10-12 (about 8 months ago relative to 2026-06-11) and a follow-up update shortly before (2025-09-11).
- Update cadence looks bursty but currently active: v4.1.0 and v4.1.1 came within about a month of each other in late 2025, following a much longer gap since v4.0.0 in 2021.
AI summary generated 2026-06-11
Recent updates
v4.1.1
2025-10-12Release 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
2025-09-11v4.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
2021-05-03v4.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
2019-04-17v3.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