pub fn decode_uri_component(encoded: &str) -> Result<JsString, JsValue>
The decodeURIComponent() function decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine.
decodeURIComponent()
encodeURIComponent
MDN documentation