Interface

State

State

Represents the session state with expiration and last check timestamps.

View Source lib/events/SessionState.ts, line 41

Methods

# static remainingSecondsToTime(seconds) → {number}

Converts a number of seconds into a timestamp.
Parameters:
Name Type Description
seconds number Remaining seconds to be converted into a timestamp.

View Source lib/state/State.ts, line 116

number

# static timeToRemainingSeconds(time) → {number}

Converts a timestamp into remaining seconds that you can count down.
Parameters:
Name Type Description
time number Timestamp in seconds (since January 1, 1970 00:00:00 UTC).

View Source lib/state/State.ts, line 107

number

# read() → {State}

Reads and decodes the locally stored data.

View Source lib/state/State.ts, line 91

State

# write() → {State}

Encodes and writes the data to the local storage.

View Source lib/state/State.ts, line 98

State