Arcjet Redact quick start
The Arcjet Redaction library makes it easy to redact sensitive information locally.
What are Arcjet utilities?
Arcjet utilities are independent libraries that do not require the use of the main Arcjet SDK—they can be used with or without other Arcjet rules.
We take the pain out of implementing security tasks through these utilities to provide a security as code approach to developer-first 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.