silverwolf-x/project / packages /next /src /server /lib /decode-query-path-parameter.ts
silverwolf-x's picture
download
raw
389 Bytes
/**
* Decodes a query path parameter.
*
* @param value - The value to decode.
* @returns The decoded value.
*/
export function decodeQueryPathParameter(value: string) {
// When deployed to Vercel, the value may be encoded, so this attempts to
// decode it and returns the original value if it fails.
try {
return decodeURIComponent(value)
} catch {
return value
}
}

Xet Storage Details

Size:
389 Bytes
·
Xet hash:
b56ea04ab92a37192894f3659d3b192914a9cf3968eaf5b36535fe6c5f89ef0e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.