kinetex - v1.0.0-rc.1
    Preparing search index...

    Function withTrailingSlash

    • Ensure a URL has a trailing slash on the pathname.

      Parameters

      • url: string

        The URL to modify.

      Returns string

      URL with a trailing slash on the pathname.

      Note: Relative URLs (e.g., "api/users") require a base URL to be resolved. This function will throw on purely relative URLs without a base. Use absolute URLs or URLs with a scheme (http://, https://).