Class: EphemeralStorageKeeper

EphemeralStorageKeeper()

Ephemeral storage keeper that stores data in memory only. This storage keeper uses a Map to store data in memory and does not persist data across browser sessions. Data is lost when the page is reloaded or the browser is closed.

Constructor

new EphemeralStorageKeeper()

Source:

Methods

clear()

Clear all ephemeral storage data.
Source:

getHideIntroduction() → {boolean}

Get the user's introduction hiding preference from ephemeral storage.
Source:
Returns:
True if the introduction should be hidden, false otherwise
Type
boolean

getSource() → {string|null}

Get the user's source code from ephemeral storage.
Source:
Returns:
The source code or null if not found
Type
string | null

setHideIntroduction(hide)

Set the user's introduction hiding preference in ephemeral storage.
Parameters:
Name Type Description
hide boolean Whether to hide the introduction
Source:

setSource(code)

Save the user's source code to ephemeral storage.
Parameters:
Name Type Description
code string The source code to save
Source: