DuckDB Terminal - v0.2.0
    Preparing search index...

    Class LinkProvider

    A class for processing text output and adding clickable hyperlinks.

    The LinkProvider wraps the utility functions in a stateful class that can be enabled/disabled and configured with a maximum URL display length.

    const provider = new LinkProvider();

    // Process text with links
    const output = provider.process('See https://example.com');

    // Disable link processing
    provider.setEnabled(false);
    Index

    Constructors

    Properties

    enabled: boolean = true
    maxURLLength: number = 80

    Methods

    • Process text and add hyperlinks to URLs

      Parameters

      • text: string

      Returns string

    • Process text with truncated URL display

      Parameters

      • text: string

      Returns string

    • Enable or disable URL linking

      Parameters

      • enabled: boolean

      Returns void

    • Set maximum URL display length

      Parameters

      • length: number

      Returns void