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
- Maintenance status: Recently updated, with the last upstream push on 2025-10-12 (about 11 months ago from 2026-09-10), suggesting some ongoing maintenance but at a low frequency.
- Update cadence: A quick follow-up update occurred (v4.1.0 on 2025-09-11, then v4.1.1 on 2025-10-12), but prior activity shows very large gaps (for example, v4.0.0 in 2021, v3.0.0 in 2019), indicating an overall slow cadence.
AI summary generated
Recent updates
v4.1.1
Release 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
v4.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
v4.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
v3.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