Skip to content

Function: decode() ​

ts
function decode(hash): ViewerStateV2;

Defined in: serialization/ViewerState.ts:335

Decode a URL hash fragment and normalize it to the current ViewerStateV2. Throws on invalid input, corrupted data, or unsupported versions.

Parameters ​

hash ​

string

Returns ​

ViewerStateV2

Released under the MIT License.