Function: decodePath() ​

Source: 1.1.0 · a1d5eeca2f43

ts
function decodePath(path): string;

Defined in: packages/valaxy/client/utils/path.ts:17

Decode a percent-encoded URL path (/posts/%E4%B8%AD → /posts/中).

Route records and route.path are percent-encoded, while file names, config links and collection keys are written raw. Decode before comparing them. Malformed sequences return the path unchanged.

Parameters ​

path ​

string

Returns ​

string