utils/pathGenerator
Functions
'Read the “', Functions, '” section'ensureLeadingSlash()
'Read the “', ensureLeadingSlash(), '” section'function ensureLeadingSlash(href: string): string
Defined in: studiocms/packages/studiocms_devapps/src/utils/pathGenerator.ts:33
Ensure the passed path starts with a leading slash.
Parameters
'Read the “', Parameters, '” section'string
string
pathGenerator()
'Read the “', pathGenerator(), '” section'function pathGenerator(endpointPath: string, _base: string): (path: string) => string
Defined in: studiocms/packages/studiocms_devapps/src/utils/pathGenerator.ts:40
Endpoint path generator
Parameters
'Read the “', Parameters, '” section'endpointPath
'Read the “', endpointPath, '” section'string
string
Function
Parameters
'Read the “', Parameters, '” section'string
string
pathWithBase()
'Read the “', pathWithBase(), '” section'function pathWithBase(path: string, _base: string): string
Defined in: studiocms/packages/studiocms_devapps/src/utils/pathGenerator.ts:12
Get the a root-relative URL path with the site’s base
prefixed.
Parameters
'Read the “', Parameters, '” section'string
string
string
stripLeadingSlash()
'Read the “', stripLeadingSlash(), '” section'function stripLeadingSlash(href: string): string
Defined in: studiocms/packages/studiocms_devapps/src/utils/pathGenerator.ts:19
Ensure the passed path does not start with a leading slash.
Parameters
'Read the “', Parameters, '” section'string
string
stripTrailingSlash()
'Read the “', stripTrailingSlash(), '” section'function stripTrailingSlash(href: string): string
Defined in: studiocms/packages/studiocms_devapps/src/utils/pathGenerator.ts:26
Ensure the passed path does not end with a trailing slash.
Parameters
'Read the “', Parameters, '” section'string
string