Back to Explore

sindresorhus/strip-indent

GitHub
1 watchersOpen source

Last release: 7 months ago

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

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

Recent updates

  • v4.1.1

    7 months ago

    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.

    Breaking
  • v4.1.0

    9 months ago

    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.

    Features
  • v4.0.0

    5/3/2021

    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.

    Breaking
  • v3.0.0

    4/17/2019

    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