Back to Explore

unjs/destr

GitHub
1 watchersOpen source

Last release:

destr is a Node.js, Deno, and JavaScript utility that provides a faster, safer alternative to JSON.parse for arbitrary inputs. It supports safeDestr for strict parsing, returns the original value when parsing fails, and includes protections intended to help avoid prototype pollution.

Project status

  • Maintenance status: The upstream repository shows a push on 2026-06-09, but the most recent tagged updates are from v2.0.5 (2025-04-03), suggesting the project is not consistently publishing updates to npm in recent months.
  • Apparent update cadence: Early releases were more frequent (2023-06 through 2024-02), then updates slowed to a gap of about 1 year between v2.0.4 (2025-04-03) and the prior v2.0.3 (2024-02-20), and no tagged updates appear after 2025-04-03 as of today.

AI summary generated

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

Recent updates

  • v2.0.5

    v2.0.5 makes a build tooling change only. It downgrades the unbuild dependency to address a CJS type regression, with the concrete version change reflected in package.json and pnpm-lock.yaml.

  • v2.0.4

    v2.0.4 focuses on performance improvements to `destr` string parsing, including faster handling of plain strings and known literal values. It also adds a `sideEffects: false` package.json flag. The code diff additionally includes several dev tooling and CI changes that are not mentioned in the release notes.

  • v2.0.3

    v2.0.3 focuses on fixing compatibility with runtimes that do not implement String.prototype.at(). The main behavior change is in the string handling fast-path, with additional repo hygiene updates (bench tooling, CI, and dependency churn).

  • v2.0.2

    v2.0.2 focuses on fixing how destr recognizes and parses numeric-like strings (decimals and scientific notation), and it hardens the “fast path” behavior for quoted strings that may contain escape characters. The code changes are primarily in the input-shape detection logic in src/index.ts, plus added unit tests for escaped strings and a broader set of numeric cases.

  • v2.0.1

    v2.0.1 is a small patch release focused on performance and documentation/testing updates. The main code change avoids unnecessary lowercasing for long input strings, while tests and dev tooling (and lockfile) are updated accordingly.

  • v2.0.0

    v2.0.0 makes Destr typesafe by default and introduces stricter, safer behaviors via new APIs. The main migration impact is an export change, where you must switch to the named `destr` export, plus potential TypeScript typing differences due to updated generic defaults.

    BreakingFeatures