MCPcopy Index your code
hub / github.com/browserless/browserless / getFinalPathSegment

Function getFinalPathSegment

src/utils.ts:995–996  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

993};
994
995export const getFinalPathSegment = (pathname: string): string | undefined =>
996 pathname.split(/[?#&]/)[0].split('/').filter(Boolean).pop();
997
998/**
999 * Canonicalize a candidate URL value so trivial obfuscations cannot bypass a

Callers 4

utils.spec.tsFile · 0.85
handlerMethod · 0.85
getBrowserForRequestMethod · 0.85
handler.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected