MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / decodeUrlPathVariants

Function decodeUrlPathVariants

packages/parsers/src/utils/urlPath.ts:1–11  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

1export function decodeUrlPathVariants(path: string): string[] {
2 const variants = [path];
3 try {
4 const decoded = decodeURIComponent(path);
5 if (decoded !== path) variants.unshift(decoded);
6 } catch {
7 // Malformed percent sequences may be literal filesystem names.
8 }
9
10 return variants;
11}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected