Arcjet Redact quick start
The Arcjet Redaction library makes it easy to redact sensitive information locally. It is a utility library independent of the main Arcjet SDK so can be used with or without other Arcjet rules.
What is Arcjet?
Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.SDK installation
Follow these steps to get started:
1. Install Arcjet Redact
In your project root, run the following command to install the Arcjet redact library:
2. Redact some text
Now all you have to do to Redact text is to call the redact
function. It can
be configured to redact a number of built-in entity types, or else you can
provide a custom detect function to redact your own types. The types that we support
by default are: email
, phone-number
, ip-address
, credit-card
.
3. Unredact a response
If you want to un-redact some text that contains the replacements from the redact
function just call unredact
, it is passed as the value in the return array.
Get help
Need help with anything? Email us or join our Discord to get support from our engineering team.