mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
12 lines
304 B
TypeScript
12 lines
304 B
TypeScript
export function decodeUrlPathVariants(path: string): string[] {
|
|
const variants = [path];
|
|
try {
|
|
const decoded = decodeURIComponent(path);
|
|
if (decoded !== path) variants.unshift(decoded);
|
|
} catch {
|
|
// Malformed percent sequences may be literal filesystem names.
|
|
}
|
|
|
|
return variants;
|
|
}
|