Mask secrets & PII before they reach your logs — by sensitive key name (password, token, authorization…) and by pattern (JWTs, API keys, emails, cards, IPs). Deep, on strings and objects.
Install
$ npm install @lacspace/redact
Quick example
@lacspace/redactts
redact({ password: "x", token: "y" })
Returns { password: "[REDACTED]" }
Tips
Zero-dependency and isomorphic — safe to import on the server, in the browser, on the edge and in React Native. It tree-shakes, so you only ship what you import.
Looking for the complete API and more examples? The npm page and GitHub README carry the full reference — or grab the PDF.