import { WorkerRouter } from "https://deno.land/x/shed@v0.1.0-pre.10/index.ts";
Add a route that matches any method with the provided pattern.
Note that the pattern here is interpreted as a URLPatternInit
which has important implication for matching.
Mostly, this is for use in Service Workers to intercept requests to external resources.
The name external
is a bit of a misnomer. It simply forwards init
to the URLPattern
constructor,
instead of being limited to the pathname
property in the general case.
Parameters
init: string | URLPatternInit