Skip to main content

linkConstructor

Callable

  • linkConstructor(options: { domain: string; key?: string; localhost?: boolean; noDomain?: boolean; pretty?: boolean }): string

  • Constructs a link based on the provided parameters.

    @example
    // Construct a link with domain "example.com" and key "page1"
    linkConstructor({ domain: "example.com", key: "page1" });

    // Construct a link with domain "example.com" and key "_root"
    linkConstructor({ domain: "example.com", key: "_root" });

    // Construct a link with localhost and key "page1"
    linkConstructor({ domain: "example.com", key: "page1", localhost: true });