Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Join a base URL with a relative path using exactly one slash between them.

      Tolerant of base URLs that omit the trailing slash and of paths that include a leading slash โ€” both common foot-guns when callers concatenate URL strings by hand. Empty inputs are passed through: an empty base returns path unchanged, and an empty path returns base unchanged (useful for directory listings or when the path is computed conditionally).

      Parameters

      • base: string

        Base URL (with or without trailing slash); empty string returns path as-is

      • path: string

        Relative path (with or without leading slash); empty string returns base as-is

      Returns string

      The two segments joined by exactly one /, or whichever input is non-empty when one is empty