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

Function removeUrlQuery

packages/vite/src/node/utils.ts:331–333  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

329export const urlRE: RegExp = /(\?|&)url(?:&|$)/
330export const rawRE: RegExp = /(\?|&)raw(?:&|$)/
331export function removeUrlQuery(url: string): string {
332 return url.replace(urlRE, '$1').replace(trailingSeparatorRE, '')
333}
334
335export function injectQuery(url: string, queryToInject: string): string {
336 const { file, postfix } = splitFileAndPostfix(url)

Callers 2

handlerFunction · 0.90
handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected