The base64 encoded string to deserialize
The original string that was serialized
deserialize("SGVsbG8gV29ybGQ=") // Returns "Hello World"
deserialize(serialize("Special!")) // Returns "Special!"
deserialize(serialize("你好")) // Returns "你好"
export function deserialize(data: string): string {
return decodeURIComponent(atob(data));
}
Deserializes a base64 encoded string back to its original form. Reverses the serialize() operation by first base64 decoding, then URI decoding the result.