MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / getPathname

Function getPathname

packages/url/src/index.ts:22–26  ·  view source on GitHub ↗
(u: string)

Source from the content-addressed store, hash-verified

20}
21
22export const getPathname = (u: string) => {
23 const end = u.indexOf('?')
24
25 return u.slice(0, end === -1 ? u.length : end)
26}
27
28export const getQueryParams = (url = '/'): ParsedUrlQuery => parse(url.slice(url.indexOf('?') + 1))

Callers 4

faviconFunction · 0.90
url.test.tsFile · 0.90
handlerMethod · 0.85
handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected