Storage

dev.cheleb.ziotapir.Storage
object Storage

A simple storage utility using the browser's localStorage.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Storage.type

Members list

Value members

Concrete methods

def get(key: String): Option[String]

Gets a value from localStorage for the given key.

Gets a value from localStorage for the given key.

Value parameters

key

the key to get

Attributes

Returns

an option containing the value if it exists and is non-empty

def remove(key: String): Unit

Removes a value from localStorage for the given key. *

Removes a value from localStorage for the given key. *

Value parameters

key

the key to remove

Attributes

def removeAll(): Unit

Removes all values from localStorage.

Removes all values from localStorage.

Attributes

def set(key: String, value: String): Unit

Sets a value in localStorage for the given key.

Sets a value in localStorage for the given key.

Value parameters

key

the key to set

value

the value to set

Attributes