Arcjet helps developers protect their apps in just a few lines of code. Implement rate limiting, bot protection, email verification, and defense against common attacks.
This is the Arcjet TypeScript and JavaScript sensitive information redaction library.
npm install -S @arcjet/redact
const text = "Hi, my name is John and my email adress is [email protected]";
const [redacted, unredact] = await redact(text, {
redact: ["email", "phone-number"],
});
console.log(redacted);
// Hi, my name is John and my email address is <Redacted email #0>
const unredacted = unredact("Your email address is <Redacted email #0>");
console.log(unredacted); // Your email address is [email protected]
Licensed under the Apache License, Version 2.0.