MCPcopy
hub / github.com/vitejs/vite / stripTrailingSlashIfNeeded

Function stripTrailingSlashIfNeeded

playground/vitestSetup.ts:400–405  ·  view source on GitHub ↗
(url: string, base: string)

Source from the content-addressed store, hash-verified

398}
399
400function stripTrailingSlashIfNeeded(url: string, base: string): string {
401 if (base === '/') {
402 return url.replace(/\/$/, '')
403 }
404 return url
405}
406
407declare module 'vite' {
408 export interface UserConfig {

Callers 1

startDefaultServeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected