dedent is an ES6 string tag (and also usable as a function) that strips indentation from multi-line strings, making template strings easier to read and keeping unintended spaces out of the output. It also supports options like trimming leading and trailing whitespace, aligning multi-line interpolated values (alignValues), and controlling whether special characters are escaped.
Project status
- The repository appears actively maintained, with new version updates in 2025-09-03 (v1.7.0) and again in 2026-03-01 (v1.7.2), indicating ongoing development rather than maintenance-only status.
- The apparent update cadence is moderate to recent activity, about a 6 month gap between v1.7.0 and v1.7.1, then roughly 20 seconds between v1.7.1 and v1.7.2, suggesting rapid follow-up after the prior update.
AI summary generated Today
Recent updates
v1.7.2
3 months agov1.7.2 fixes handling of escape sequences when using the dedent tagged-template API. The code change expands unescaping behavior beyond just `\n`, converting multiple escape forms into their actual character equivalents when `escapeSpecialCharacters` is enabled.
v1.7.1
3 months agov1.7.1 primarily adds a Bun-specific workaround to preserve Unicode characters when running the dedent tagged template. The code also expands test coverage for emojis and ideographs, and introduces optional Bun-based test execution for contributors. Release notes only mention the Bun Unicode workaround, but the diff shows additional, undocumented tooling and configuration changes.
v1.7.0
9 months agoThis release adds a new `alignValues` option to the `dedent` tagged template helper, along with supporting tests and TypeScript typings. When enabled, multi-line interpolated strings are re-indented so their subsequent lines visually align with the interpolation’s starting column. The release notes also mention a README badge cleanup.
Featuresv1.6.0
5/1/2025v1.6.0 adds a new `trimWhitespace` option to the `dedent` template tag. The implementation changes when the library trims leading and trailing whitespace, and it updates tests and the README accordingly.
Featuresv1.5.3
4/11/2024v1.5.3 makes a small change to the package metadata in package.json. It removes the Node engine constraint and the npm provenance publish configuration.
Breakingv1.5.2
4/11/2024v1.5.2 is primarily a tooling and maintenance release, with documented updates to the build/lint setup, pnpm onboarding, and README/doc tweaks. It also includes a small functional fix related to how escaped newlines and special characters are handled when `escapeSpecialCharacters` is configured.
Breakingv1.5.1
7/31/2023v1.5.1 is a small packaging fix focused on TypeScript ESM type definition distribution. The release notes claim it adds a missing `dedent.d.mts` entry to `package.json` so downstream TypeScript users can resolve the correct ESM types.
v1.5.0
7/30/2023v1.5.0 introduces a new `escapeSpecialCharacters` option and a `dedent.withOptions()` API to control how special characters are treated when using the library. Release notes only mention this option, but the implementation changes where escaping is applied, affecting how `dedent` behaves when called as a normal function versus as a string tag.
Featuresv1.4.0
7/30/2023Release v1.4.0 is described as two small fixes: adding a missing ESM type definition file and consuming the first level of escaping for `$` and `{` characters. The code diff, however, shows broader packaging and build system changes (TypeScript conversion, new package.json exports/types wiring, and changes to how babel-plugin-macros is provided).
v1.0.1
7/30/2023Release v1.0.1 is described as a version bump only to mark the 1.x line as stable. The code diff shows no functional code changes, only an update to the package version in package.json.