MCPcopy
hub / github.com/browserless/browserless / compilePathMatchers

Method compilePathMatchers

src/router.ts:93–106  ·  view source on GitHub ↗
(
    route:
      | HTTPRoute
      | BrowserHTTPRoute
      | WebSocketRoute
      | BrowserWebsocketRoute,
  )

Source from the content-addressed store, hash-verified

91 }
92
93 protected compilePathMatchers(
94 route:
95 | HTTPRoute
96 | BrowserHTTPRoute
97 | WebSocketRoute
98 | BrowserWebsocketRoute,
99 ) {
100 this.pathMatchers.set(
101 route,
102 (route.path as Array<PathTypes>).map((p) =>
103 micromatch.matcher(p as string),
104 ),
105 );
106 }
107
108 protected getTimeout(req: Request) {
109 const timer = req.parsed.searchParams.get('timeout');

Callers 2

registerHTTPRouteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected