Skip to content

@ossredact/core 0.2.0

Latest

Choose a tag to compare

@Skiipy11 Skiipy11 released this 21 Jun 05:26
· 3 commits to main since this release

Shared TypeScript redaction core used by the OSSRedact gateway and the in-browser workbench.

Added

  • Do-not-redact allowlistapplyAllowlist, isAllowlisted, buildAllowSet, normalizeAllowValue for user-declared known-safe values (floor-protected: a value on the allowlist still cannot exempt a hard-floor type).
  • Always-redact denylist — force-redact arbitrary custom terms to <CUSTOM_n> in every mode.
  • Placeholder-contract guardPLACEHOLDER_CONTRACT_PATTERN / PLACEHOLDER_CONTRACT_RE shared placeholder shape.
  • Floor parity hardening mirrored from the gateway core: zero-width / format-char (Cf/Cc) resistance (hasFormatChars, stripFormatChars), digit-homoglyph folding (normDigits), and the glued / separated card + digit floors (gluedDigitSpans, separatedCardSpans, cardAuxSpans, cueNameSpans).

Fixed

  • Accented-email floor — email addresses with accented local-parts or domains (e.g. françois@société.fr) were not redacted in 0.1.x. The email matcher is now Unicode-aware.
  • O(n^2) email-regex blowup on long dotted runs (a leading look-behind restores linear scanning).

MIT. 167 tests green. Part of OSSRedact.