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

Function decodeURIIfPossible

packages/vite/src/node/utils.ts:1811–1818  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1809}
1810
1811export function decodeURIIfPossible(input: string): string | undefined {
1812 try {
1813 return decodeURI(input)
1814 } catch {
1815 // url is malformed, probably a interpolate syntax of template engines
1816 return
1817 }
1818}
1819
1820type SigtermCallback = (signal?: 'SIGTERM', exitCode?: number) => Promise<void>
1821

Callers 3

serveStaticMiddlewareFunction · 0.90
serveRawFsMiddlewareFunction · 0.90
handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected