Library API
    Preparing search index...

    Function proxify

    • Creates a Stealth Proxy pattern to allow for on-demand lazy property discovery and registration. Provides deep-freezing and bounding capabilities depending on options.

      Type Parameters

      • T extends object

      Parameters

      • target: T

        The object to proxify

      • frozen: boolean = true

        Whether the proxy should throw on mutation (default: true)

      • lock: boolean = frozen

        Whether to deep-freeze the underlying target (default: frozen)

      • skip: WeakSet<object> = ...

        A WeakSet of objects to skip during deep-freeze

      Returns T

      The proxified object

      const p = proxify({ a: 1 });