MCPcopy
hub / github.com/facebook/docusaurus / addTrailingPathSeparator

Function addTrailingPathSeparator

packages/docusaurus-utils/src/pathUtils.ts:131–136  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

129}
130
131export function addTrailingPathSeparator(str: string): string {
132 return str.endsWith(path.sep)
133 ? str
134 : // If this is Windows, we need to change the forward slash to backward
135 `${str.replace(/[\\/]$/, '')}${path.sep}`;
136}

Callers 1

pathUtils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…