API Documentation for: 1.1.23
Show:

SavedData Class

Defined in: SavedData:8
Namespace: cloudkid

The SavedData functions use localStorage and sessionStorage, with a cookie fallback.

Item Index

Methods

Methods

read

(
  • name
)
Mixed static

Defined in read:86

Read the value of a saved variable

Parameters:

  • name String

    The name of the variable

Returns:

Mixed:

The value (run through JSON.parse()) or null if it doesn't exist

remove

(
  • name
)
static

Defined in remove:35

Remove a saved variable by name.

Parameters:

  • name String

    The name of the value to remove

write

(
  • name
  • value
  • [tempOnly=false]
)
static

Defined in write:52

Save a variable.

Parameters:

  • name String

    The name of the value to save

  • value Mixed

    The value to save. This will be run through JSON.stringify().

  • [tempOnly=false] Boolean optional

    If the value should be saved only in the current browser session.