@arcjet/redact

v1.0.0-alpha.28
Arcjet sensitive information redaction library

Arcjet Logo

@arcjet/redact

npm badge

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.

Installation

npm install -S @arcjet/redact

Example

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]

License

Licensed under the Apache License, Version 2.0.

npm i @arcjet/redact

Metadata

Downloads