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

Function posixPath

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

Source from the content-addressed store, hash-verified

56 * Adopted from https://github.com/sindresorhus/slash/blob/main/index.js
57 */
58export function posixPath(str: string): string {
59 const isExtendedLengthPath = str.startsWith('\\\\?\\');
60
61 if (isExtendedLengthPath) {
62 return str;
63 }
64 return str.replace(/\\/g, '/');
65}
66
67/**
68 * When you want to display a path in a message/warning/error, it's more

Callers 15

aliasedSourceFunction · 0.90
getBlogEditUrlFunction · 0.90
runTestFunction · 0.90
safeGlobbyFunction · 0.90
pathUtils.test.tsFile · 0.90
getDocEditUrlFunction · 0.90
aliasedSourceFunction · 0.90
getEditUrlFunction · 0.90
getEditUrlLocalizedFunction · 0.90
loadSiteFunction · 0.90
testMetaFunction · 0.90
layerForFunction · 0.90

Calls

no outgoing calls

Tested by 5

runTestFunction · 0.72
loadSiteFunction · 0.72
testMetaFunction · 0.72
snapshotThemeDirFunction · 0.72
stableCreatedFilesFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…