MCPcopy
hub / github.com/intentui/intentui / stripExt

Function stripExt

src/scripts/generate-registry.ts:143–143  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

141const exists = async (p: string) => !!(await fs.stat(p).catch(() => false))
142const toPosix = (p: string) => p.split(path.sep).join('/')
143const stripExt = (p: string) => p.replace(/\.[^.]+$/, '')
144const stripTrailingIndex = (p: string) => p.replace(/\/index$/, '')
145const escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
146

Callers 2

makeFunction · 0.85
exampleSlugFromFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected