Skip to main content

core.ensuretrailingslash

Home > @medplum/core > ensureTrailingSlash

ensureTrailingSlash() function

Ensures the given URL has a trailing slash.

Signature:

export declare function ensureTrailingSlash(url: string): string;

Parameters

Parameter

Type

Description

url

string

The URL to ensure has a trailing slash.

Returns:

string

The URL with a trailing slash.