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

  • Maintenance status: Looks mostly quiet relative to today, with the most recent documented updates being v0.4.0 (2025-10-14) and no newer tagged update shown, even though there was an upstream push on 2026-03-01. Overall, it does not currently read as actively shipping frequent changes.
  • Update cadence: From v0.1.1 to v0.4.0, updates were clustered in late 2025, but the gap from the latest listed update (2025-10-14) to 2026-08-13 is roughly 10 months, suggesting a slowdown or maintenance-mode 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
  • v0.2.0

    v0.2.0 updates slow-redact to validate redaction paths up front (to align with fast-redact), and hardens property traversal to avoid unsafe operations on primitives. It also changes the censor callback so the path argument matches fast-redact compatibility expectations.

    BreakingFeatures
  • v0.1.1

    v0.1.1 adds additional security test coverage focused on prototype pollution scenarios, improving confidence in the project’s redaction behavior. It also updates the GitHub Actions workflow dependency, bumping actions/checkout to a newer major version.

    Security