Back to Explore

pinojs/redact

GitHub
1 watchersOpen source

Last release:

@pinojs/redact is a JavaScript utility for smart redaction of sensitive object fields, using a redaction function created with `pinoRedact(options)`. It lets you specify nested key paths (including wildcards and array indices) to replace values with a censor string (default `[REDACTED]`) while keeping the original object unchanged, which makes it useful for safe, immutable logging and debugging.

Project status

  • The source appears to have been actively developed through late 2025 (v0.3.0 to v0.4.0), and there is an upstream push on 2026-03-01, but no update information is shown after v0.4.0 (2025-10-14), suggesting reduced cadence rather than continuous releases.
  • Update cadence looks irregular, with feature updates clustered in late September to mid October 2025, then a long gap until at least 2026-03-01 upstream activity. Relative to 2026-08-12, that points to a quiet period.

AI summary generated

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

Recent updates

  • v0.4.0

    v0.4.0 renames the package from slow-redact to @pinojs/redact and includes a code fix for redacting paths that contain 3 or more consecutive wildcard segments. The README, benchmarks, and release-note generation workflow were updated to reflect the new package name. Code-wise, the wildcard redaction logic was extended to recursively process remaining wildcard segments.

    Breaking
  • v0.3.1

    v0.3.1 introduces TypeScript type definitions and fixes behavior where the user-supplied censor function was called for paths that do not exist. The code changes also adjust how path existence is checked during redaction.

    Features
  • v0.3.0

    v0.3.0 introduces key-removal support via a new `remove: true` option, plus fixes to path parsing and validation edge cases. Specifically, it improves handling of comma-separated invalid paths, fixes empty-string bracket notation parsing, and adjusts internal redaction behavior to support removals including wildcard paths.

    Features