effect-io-ai

Package: effect
Module: Redacted

Redacted.make

Creates a Redacted wrapper for a sensitive value.

When to use

Use to wrap a sensitive value so normal string, JSON, and inspection output is redacted.

Details

The wrapper redacts string, JSON, and inspection output to reduce accidental disclosure. The original value remains retrievable with Redacted.value until the wrapper is wiped or becomes unreachable.

Example (Creating a redacted value)

import { Redacted } from "effect"

const API_KEY = Redacted.make("1234567890")

Signature

declare const make: <T>(value: T, options?: { readonly label?: string | undefined; }) => Redacted<T>

Source

Since v3.3.0