Developer guides

Put a redaction boundary where data can leak

These guides solve four concrete problems with complete, copyable JavaScript. Each pattern runs locally with the zero-dependency Flare Redact core.

PII redaction in JavaScript

Redact emails, payment data, phone numbers, identifiers, and nested object values without mutating the input.

Hide secrets in Node.js logs

Protect Pino, Winston, console output, request snapshots, and streams before records leave the process.

Redact LLM prompts

Keep secrets and PII out of OpenAI or Anthropic calls while preserving useful references in model replies.

Secure MCP tool boundaries

Stop cross-tool placeholder restoration by binding every reversible placeholder to a trusted tool scope.

One policy, several boundaries

Redaction is most reliable when it happens before a value reaches a logger, external model, analytics SDK, webhook, or tool. Flare Redact uses the same policy shape at each boundary, so a credential is not protected in one path and forgotten in another.

npm install flare-redact

Start with the guide closest to your leak path. The complete API reference covers detectors, transforms, streams, CSV, HTTP, fetch, and the CLI.